* fix not found hander inserting disks into itself fixes #2528 fixes #2190 * fix formatting
This commit is contained in:
@@ -72,7 +72,11 @@ public class GridContainer extends BaseContainer implements ICraftingGridListene
|
||||
transferManager.setNotFoundHandler(slotIndex -> {
|
||||
if (!getPlayer().getEntityWorld().isRemote) {
|
||||
Slot slot = inventorySlots.get(slotIndex);
|
||||
|
||||
if (grid instanceof IPortableGrid && slot instanceof SlotItemHandler) {
|
||||
if (((SlotItemHandler) slot).getItemHandler().equals(((IPortableGrid) grid).getDisk())) {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
if (slot.getHasStack()) {
|
||||
if (slot == craftingResultSlot) {
|
||||
grid.onCraftedShift(getPlayer());
|
||||
|
Reference in New Issue
Block a user