mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-19 11:49:14 +00:00
Giant Inventory Refactor 2. Slots will only accept valid items
Moved logic out of Containers, the old filtered slots were not always the same logic as the IInventory. Moved ISidedInventory logic up to TileForestry and use InventoryAdapters to override only the methods we need to. Tested a ton but there will be some new issues given the scope.
This commit is contained in:
1 parent
2b3b590cf4
commit
c54b7c40bb
124 files changed
+2414
-4259
No files matched your search
@@ -10,21 +10,22 @@
|
||||
******************************************************************************/
|
||||
package forestry.apiculture.gui;
|
||||
|
||||
import forestry.apiculture.items.ItemBeeGE;
|
||||
import forestry.apiculture.items.ItemImprinter.ImprinterInventory;
|
||||
import forestry.core.gui.ContainerForestry;
|
||||
import forestry.core.gui.IGuiSelectable;
|
||||
import forestry.core.gui.slots.SlotCustom;
|
||||
import forestry.core.network.PacketIds;
|
||||
import forestry.core.network.PacketPayload;
|
||||
import forestry.core.network.PacketUpdate;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.apiculture.items.ItemImprinter.ImprinterInventory;
|
||||
import forestry.core.gui.ContainerForestry;
|
||||
import forestry.core.gui.IGuiSelectable;
|
||||
import forestry.core.gui.slots.SlotFiltered;
|
||||
import forestry.core.gui.slots.SlotOutput;
|
||||
import forestry.core.network.PacketIds;
|
||||
import forestry.core.network.PacketPayload;
|
||||
import forestry.core.network.PacketUpdate;
|
||||
import forestry.core.proxy.Proxies;
|
||||
|
||||
public class ContainerImprinter extends ContainerForestry implements IGuiSelectable {
|
||||
|
||||
public final ImprinterInventory inventory;
|
||||
@@ -35,9 +36,9 @@ public class ContainerImprinter extends ContainerForestry implements IGuiSelecta
|
||||
|
||||
this.inventory = inventory;
|
||||
// Input
|
||||
this.addSlotToContainer(new SlotCustom(inventory, 0, 152, 12, ItemBeeGE.class));
|
||||
this.addSlotToContainer(new SlotFiltered(inventory, 0, 152, 12));
|
||||
// Output
|
||||
this.addSlotToContainer(new SlotCustom(inventory, 1, 152, 72, ItemBeeGE.class));
|
||||
this.addSlotToContainer(new SlotOutput(inventory, 1, 152, 72));
|
||||
|
||||
// Player inventory
|
||||
for (int i1 = 0; i1 < 3; i1++)
|
||||
|
||||
Reference in new issue
Block a user