Skip to content

Commit

Permalink
Set the cached coordinates on SubTile NBT read to null if TAG_POOL_Y …
Browse files Browse the repository at this point in the history
…is -1.
  • Loading branch information
Vazkii committed Jun 19, 2015
1 parent 093c6a7 commit f6ad7a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Expand Up @@ -155,7 +155,7 @@ public void readFromPacketNBT(NBTTagCompound cmp) {
int y = cmp.getInteger(TAG_POOL_Y);
int z = cmp.getInteger(TAG_POOL_Z);

cachedPoolCoordinates = new ChunkCoordinates(x, y, z);
cachedPoolCoordinates = y < 0 ? null : new ChunkCoordinates(x, y, z);
}

@Override
Expand Down
Expand Up @@ -177,14 +177,12 @@ public int getColor() {
@Override
public void readFromPacketNBT(NBTTagCompound cmp) {
mana = cmp.getInteger(TAG_MANA);
if(!cmp.hasKey(TAG_TICKS_EXISTED))
ticksExisted = cmp.getInteger(TAG_TICKS_EXISTED);

int x = cmp.getInteger(TAG_COLLECTOR_X);
int y = cmp.getInteger(TAG_COLLECTOR_Y);
int z = cmp.getInteger(TAG_COLLECTOR_Z);

cachedCollectorCoordinates = new ChunkCoordinates(x, y, z);
cachedCollectorCoordinates = y < 0 ? null : new ChunkCoordinates(x, y, z);
}

@Override
Expand Down

0 comments on commit f6ad7a7

Please sign in to comment.