Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-25 15:50:14 +01:00
Sanity check for BlockState being chest
Dieser Commit ist enthalten in:
Ursprung
db5a528965
Commit
746be566a2
@ -27,6 +27,7 @@ package org.geysermc.geyser.translator.level.block.entity;
|
||||
|
||||
import org.cloudburstmc.nbt.NbtMap;
|
||||
import org.cloudburstmc.nbt.NbtMapBuilder;
|
||||
import org.geysermc.geyser.level.block.Blocks;
|
||||
import org.geysermc.geyser.level.block.property.ChestType;
|
||||
import org.geysermc.geyser.level.block.property.Properties;
|
||||
import org.geysermc.geyser.level.block.type.BlockState;
|
||||
@ -42,6 +43,9 @@ public class DoubleChestBlockEntityTranslator extends BlockEntityTranslator impl
|
||||
|
||||
@Override
|
||||
public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState) {
|
||||
if (!(blockState.is(Blocks.CHEST) || blockState.is(Blocks.TRAPPED_CHEST))) {
|
||||
return;
|
||||
}
|
||||
if (blockState.getValue(Properties.CHEST_TYPE) != ChestType.SINGLE) {
|
||||
int x = (int) bedrockNbt.get("x");
|
||||
int z = (int) bedrockNbt.get("z");
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren