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() (chunkSection.getParent().getZ() << 4) + location.getZ()
); );
if (compoundTag != null) {
compoundTag.getValue().remove("Items"); compoundTag.getValue().remove("Items");
compoundTag.getValue().remove("Lock"); compoundTag.getValue().remove("Lock");
}
return compoundTag; return compoundTag;
} }

View File

@@ -127,7 +127,7 @@ public class AnvilChunk implements Chunk {
@Override @Override
public Biome getBiome(int x, int z) { 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 @Override

View File

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