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
parent c7319f10dc
commit 12627a7304
No known key found for this signature in database
GPG Key ID: B8EA2E5693115D81
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 {