mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-12-29 19:59:13 +00:00
Stop beacon opening earlier, improve debug logging
This commit is contained in:
@@ -160,8 +160,10 @@ public final class InventoryHolder<T extends Inventory> {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "InventoryHolder[" +
|
||||
"session=" + session + ", " +
|
||||
"session=" + session.bedrockUsername() + ", " +
|
||||
"inventory=" + inventory + ", " +
|
||||
"translator=" + translator + ']';
|
||||
"pending= " + pending + ", " +
|
||||
"containerOpenAttempts=" + containerOpenAttempts + ", " +
|
||||
"translator=" + translator.getClass().getSimpleName() + ']';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ import org.geysermc.geyser.inventory.updater.UIInventoryUpdater;
|
||||
import org.geysermc.geyser.level.block.Blocks;
|
||||
import org.geysermc.geyser.session.GeyserSession;
|
||||
import org.geysermc.geyser.translator.level.block.entity.BlockEntityTranslator;
|
||||
import org.geysermc.geyser.util.InventoryUtils;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.inventory.ContainerType;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.inventory.ServerboundSetBeaconPacket;
|
||||
|
||||
@@ -60,12 +59,9 @@ public class BeaconInventoryTranslator extends AbstractBlockInventoryTranslator<
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory(GeyserSession session, Container container) {
|
||||
if (!container.isUsingRealBlock()) {
|
||||
InventoryUtils.closeInventory(session, container.getJavaId(), false);
|
||||
return;
|
||||
}
|
||||
super.openInventory(session, container);
|
||||
public boolean prepareInventory(GeyserSession session, Container container) {
|
||||
// Virtual beacon inventories aren't possible - we don't want to spawn a whole pyramid!
|
||||
return super.canUseRealBlock(session, container);
|
||||
}
|
||||
}, UIInventoryUpdater.INSTANCE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user