Expected behavior
Given container is a Container double-chest object, calling player.openInventory(container.getInventory()) should open the double-chest inventory (54 slots). This works as expected prior to 1.21.4.
Observed/Actual behavior
A single chest inventory is opened (27 slots).
Steps/models to reproduce
Here's the full event handler; attach a sign to a double-chest, wax it, then right-click on the sign to open the chest.
From ClodMC:
@EventHandler
public void onPlayerInteract(@NotNull PlayerInteractEvent event) {
if (event.getAction() != Action.RIGHT_CLICK_BLOCK) {
return;
}
Block clickedBlock = event.getClickedBlock();
if (clickedBlock == null) {
return;
}
BlockState blockState = clickedBlock.getState();
if (!(blockState instanceof Sign sign) || !sign.isWaxed()) {
return;
}
BlockData blockData = clickedBlock.getBlockData();
if (blockData instanceof WallSign wallSign) {
Block attachedBlock = clickedBlock.getRelative(wallSign.getFacing().getOppositeFace());
if (attachedBlock.getState() instanceof Container container) {
event.setCancelled(true);
event.getPlayer().openInventory(container.getInventory());
}
}
}
Plugin and Datapack List
Paper Plugins:
Paper version
This server is running Paper version 1.21.4-31-main@d0d0efe (2024-12-23T23:53:38Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-15-bb76819 (MC: 1.21.4)
Other
No response
Expected behavior
Given
containeris a Container double-chest object, callingplayer.openInventory(container.getInventory())should open the double-chest inventory (54 slots). This works as expected prior to 1.21.4.Observed/Actual behavior
A single chest inventory is opened (27 slots).
Steps/models to reproduce
Here's the full event handler; attach a sign to a double-chest, wax it, then right-click on the sign to open the chest.
From ClodMC:
Plugin and Datapack List
Paper Plugins:
Paper version
This server is running Paper version 1.21.4-31-main@d0d0efe (2024-12-23T23:53:38Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-15-bb76819 (MC: 1.21.4)
Other
No response