mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-14 14:45:34 +01:00
Add a Paper fast-path for DoubleChest#getLeftSide when possible
This commit is contained in:
parent
c7319f10dc
commit
0d824d375b
@ -54,7 +54,7 @@ private Object transform(InventoryHolder holder) {
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user