Move inventory code to their own files, refactor, cleanup.

Register items and blocks before the rest of preInit.
This commit is contained in:
mezz committed 2015-11-05 04:47:04 -08:00
1 parent f1afca664b
commit 411b4959f2
229 files changed
+4628 -5271

No files matched your search

@@ -12,8 +12,8 @@ package forestry.apiculture.gui;
import net.minecraft.inventory.IInventory;
import forestry.apiculture.BeeHousingInventory;
import forestry.apiculture.tiles.TileApiary;
import forestry.apiculture.InventoryBeeHousing;
import forestry.apiculture.inventory.InventoryApiary;
import forestry.core.gui.ContainerForestry;
import forestry.core.gui.slots.SlotFiltered;
import forestry.core.gui.slots.SlotOutput;
@@ -22,21 +22,21 @@ import forestry.core.tiles.IFilterSlotDelegate;
public abstract class ContainerBeeHelper {
public static <T extends IInventory & IFilterSlotDelegate> void addSlots(ContainerForestry container, T inventory, boolean hasFrames) {
// Queen/Princess
container.addSlotToContainer(new SlotFiltered(inventory, BeeHousingInventory.SLOT_QUEEN, 29, 39));
container.addSlotToContainer(new SlotFiltered(inventory, InventoryBeeHousing.SLOT_QUEEN, 29, 39));
// Drone
container.addSlotToContainer(new SlotFiltered(inventory, BeeHousingInventory.SLOT_DRONE, 29, 65));
container.addSlotToContainer(new SlotFiltered(inventory, InventoryBeeHousing.SLOT_DRONE, 29, 65));
// Frames
if (hasFrames) {
int slotFrames = TileApiary.ApiaryInventory.SLOT_FRAMES_1;
int slotFrames = InventoryApiary.SLOT_FRAMES_1;
container.addSlotToContainer(new SlotFiltered(inventory, slotFrames++, 66, 23));
container.addSlotToContainer(new SlotFiltered(inventory, slotFrames++, 66, 52));
container.addSlotToContainer(new SlotFiltered(inventory, slotFrames, 66, 81));
}
// Product Inventory
int slotProduct = BeeHousingInventory.SLOT_PRODUCT_1;
int slotProduct = InventoryBeeHousing.SLOT_PRODUCT_1;
container.addSlotToContainer(new SlotOutput(inventory, slotProduct++, 116, 52));
container.addSlotToContainer(new SlotOutput(inventory, slotProduct++, 137, 39));
container.addSlotToContainer(new SlotOutput(inventory, slotProduct++, 137, 65));