mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 10:35:38 +01:00
SPIGOT-4598: Shift click on custom workbench inventory causes crash
This commit is contained in:
parent
a65b73ad9d
commit
1734f378f7
@ -17,6 +17,7 @@ import net.minecraft.server.ContainerEnchantTable;
|
||||
import net.minecraft.server.ContainerFurnace;
|
||||
import net.minecraft.server.ContainerHopper;
|
||||
import net.minecraft.server.ContainerShulkerBox;
|
||||
import net.minecraft.server.ContainerWorkbench;
|
||||
import net.minecraft.server.EntityHuman;
|
||||
import net.minecraft.server.IInventory;
|
||||
import net.minecraft.server.ItemStack;
|
||||
@ -175,6 +176,11 @@ public class CraftContainer extends Container {
|
||||
this.items = delegate.items;
|
||||
this.slots = delegate.slots;
|
||||
}
|
||||
|
||||
// SPIGOT-4598 - we should still delegate the shift click handler
|
||||
if (cachedType == InventoryType.WORKBENCH) {
|
||||
delegate = new ContainerWorkbench(bottom, entityhuman.world, entityhuman.getChunkCoordinates());
|
||||
}
|
||||
}
|
||||
|
||||
private void setupWorkbench(IInventory top, IInventory bottom) {
|
||||
|
Loading…
Reference in New Issue
Block a user