Archived
0

fix: последствия merge, не отловленные при тестировании(!)

This commit is contained in:
2018-12-26 14:04:20 +03:00
parent 243749d117
commit 41efdda320
3 changed files with 7 additions and 5 deletions

View File

@@ -62,8 +62,10 @@ public class AnvilBlock implements Block {
(chunkSection.getParent().getZ() << 4) + location.getZ()
);
compoundTag.getValue().remove("Items");
compoundTag.getValue().remove("Lock");
if (compoundTag != null) {
compoundTag.getValue().remove("Items");
compoundTag.getValue().remove("Lock");
}
return compoundTag;
}

View File

@@ -127,7 +127,7 @@ public class AnvilChunk implements Chunk {
@Override
public Biome getBiome(int x, int z) {
return Biome.getById( biomes.get( z << 4 | x) & 255 );
return Biome.getById(biomes.get((z >> 4) << 4 | (x >> 4)) & 255);
}
@Override

View File

@@ -169,8 +169,8 @@ public class ChunkDataPacket implements SCPacket {
if (biomeWrite) {
biomes.writeByte(chunk.getBiome(
chunk.getX() << 4 + x,
chunk.getZ() << 4 + z
(chunk.getX() << 4) + x,
(chunk.getZ() << 4) + z
).getId());
if (x == 15 && z == 15) {
biomeWrite = false;