Only translate double chest tags if we are dealing with a double chest (#4736)

This commit is contained in:
chris 2024-06-13 14:14:57 +02:00 committed by GitHub
parent 9db1dd10d2
commit d00cab18fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -42,10 +42,12 @@ public class DoubleChestBlockEntityTranslator extends BlockEntityTranslator impl
@Override @Override
public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState) { public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState) {
if (blockState.getValue(Properties.CHEST_TYPE) != ChestType.SINGLE) {
int x = (int) bedrockNbt.get("x"); int x = (int) bedrockNbt.get("x");
int z = (int) bedrockNbt.get("z"); int z = (int) bedrockNbt.get("z");
translateChestValue(bedrockNbt, blockState, x, z); translateChestValue(bedrockNbt, blockState, x, z);
} }
}
/** /**
* Add Bedrock block entity tags to a NbtMap based on Java properties * Add Bedrock block entity tags to a NbtMap based on Java properties