Fixed a duplication bug with a disconnected Crafting Grid. Fixes #1989
This commit is contained in:
@@ -144,6 +144,8 @@ public class ContainerGrid extends ContainerBase {
|
||||
}
|
||||
|
||||
addSlotToContainer(craftingResultSlot = new SlotGridCraftingResult(this, getPlayer(), grid, 0, 130 + 4, headerAndSlots + 22));
|
||||
|
||||
transferManager.addTransfer(grid.getCraftingMatrix(), getPlayer().inventory);
|
||||
}
|
||||
|
||||
private void addPatternSlots() {
|
||||
|
||||
@@ -41,6 +41,10 @@ public class TransferManager {
|
||||
addTransfer(new InventoryWrapperInventory(from), new InventoryWrapperItemHandler(to));
|
||||
}
|
||||
|
||||
public void addTransfer(IInventory from, IInventory to) {
|
||||
addTransfer(new InventoryWrapperInventory(from), new InventoryWrapperInventory(to));
|
||||
}
|
||||
|
||||
public void addFilterTransfer(IInventory from, IItemHandlerModifiable itemTo, FluidInventory fluidTo, Supplier<Integer> typeGetter) {
|
||||
addTransfer(new InventoryWrapperInventory(from), new InventoryWrapperFilter(itemTo, fluidTo, typeGetter));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user