Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 16:12:46 +01:00
Merge branch 'master' of https://github.com/GeyserMC/Geyser into feature/1.21
Dieser Commit ist enthalten in:
Commit
842e1b4d12
@ -64,7 +64,7 @@ public class DoubleChestInventoryTranslator extends ChestInventoryTranslator {
|
|||||||
if (session.getLastInteractionPlayerPosition().equals(session.getPlayerEntity().getPosition())) {
|
if (session.getLastInteractionPlayerPosition().equals(session.getPlayerEntity().getPosition())) {
|
||||||
BlockState state = session.getGeyser().getWorldManager().blockAt(session, session.getLastInteractionBlockPosition());
|
BlockState state = session.getGeyser().getWorldManager().blockAt(session, session.getLastInteractionBlockPosition());
|
||||||
if (!BlockRegistries.CUSTOM_BLOCK_STATE_OVERRIDES.get().containsKey(state.javaId())) {
|
if (!BlockRegistries.CUSTOM_BLOCK_STATE_OVERRIDES.get().containsKey(state.javaId())) {
|
||||||
if (state.block() == Blocks.CHEST || state.block() == Blocks.TRAPPED_CHEST
|
if ((state.block() == Blocks.CHEST || state.block() == Blocks.TRAPPED_CHEST)
|
||||||
&& state.getValue(Properties.CHEST_TYPE) != ChestType.SINGLE) {
|
&& state.getValue(Properties.CHEST_TYPE) != ChestType.SINGLE) {
|
||||||
inventory.setHolderPosition(session.getLastInteractionBlockPosition());
|
inventory.setHolderPosition(session.getLastInteractionBlockPosition());
|
||||||
((Container) inventory).setUsingRealBlock(true, state.block());
|
((Container) inventory).setUsingRealBlock(true, state.block());
|
||||||
|
@ -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
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren