Add a Paper fast-path for DoubleChest#getLeftSide when possible

This commit is contained in:
Madeline Miller 2024-03-31 20:24:14 +10:00 committed by wizjany
parent c7319f10dc
commit 0d824d375b
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ public class InventoryMoveItemEventDebounce extends AbstractEventDebounce<Key> {
if (holder instanceof BlockState blockState) {
return new BlockMaterialKey(blockState);
} else if (holder instanceof DoubleChest doubleChest) {
InventoryHolder left = doubleChest.getLeftSide();
InventoryHolder left = PaperLib.isPaper() ? doubleChest.getLeftSide(false) : doubleChest.getLeftSide();
if (left instanceof Chest chest) {
return new BlockMaterialKey(chest);
} else {