worldpoint: use passed plane when getting instance chunk for localpoint

Without this, fromLocalInstance can only find the template chunk for
the player's current plane.
This commit is contained in:
Hydrox6
2021-12-30 01:54:09 +00:00
parent 6c15080bfb
commit 99d0a61cc4

View File

@@ -198,7 +198,7 @@ public class WorldPoint
// get the template chunk for the chunk
int[][][] instanceTemplateChunks = client.getInstanceTemplateChunks();
int templateChunk = instanceTemplateChunks[client.getPlane()][chunkX][chunkY];
int templateChunk = instanceTemplateChunks[plane][chunkX][chunkY];
int rotation = templateChunk >> 1 & 0x3;
int templateChunkY = (templateChunk >> 3 & 0x7FF) * CHUNK_SIZE;