mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-25 14:24:42 +00:00
Move inventory code to their own files, refactor, cleanup.
Register items and blocks before the rest of preInit.
This commit is contained in:
1 parent
f1afca664b
commit
411b4959f2
229 files changed
+4628
-5271
No files matched your search
@@ -10,11 +10,10 @@
|
||||
******************************************************************************/
|
||||
package forestry.apiculture.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import forestry.apiculture.items.ItemImprinter.ImprinterInventory;
|
||||
import forestry.apiculture.inventory.ItemInventoryImprinter;
|
||||
import forestry.apiculture.network.PacketImprintSelectionResponse;
|
||||
import forestry.core.gui.ContainerItemInventory;
|
||||
import forestry.core.gui.IGuiSelectable;
|
||||
@@ -22,11 +21,10 @@ import forestry.core.gui.slots.SlotFiltered;
|
||||
import forestry.core.gui.slots.SlotOutput;
|
||||
import forestry.core.network.PacketGuiSelectRequest;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.InventoryUtil;
|
||||
|
||||
public class ContainerImprinter extends ContainerItemInventory<ImprinterInventory> implements IGuiSelectable {
|
||||
public class ContainerImprinter extends ContainerItemInventory<ItemInventoryImprinter> implements IGuiSelectable {
|
||||
|
||||
public ContainerImprinter(InventoryPlayer inventoryplayer, ImprinterInventory inventory) {
|
||||
public ContainerImprinter(InventoryPlayer inventoryplayer, ItemInventoryImprinter inventory) {
|
||||
super(inventory, inventoryplayer, 8, 103);
|
||||
|
||||
// Input
|
||||
@@ -35,15 +33,6 @@ public class ContainerImprinter extends ContainerItemInventory<ImprinterInventor
|
||||
this.addSlotToContainer(new SlotOutput(inventory, 1, 152, 72));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContainerClosed(EntityPlayer entityplayer) {
|
||||
if (entityplayer.worldObj.isRemote) {
|
||||
return;
|
||||
}
|
||||
|
||||
InventoryUtil.dropInventory(inventory, entityplayer.worldObj, entityplayer.posX, entityplayer.posY, entityplayer.posZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSelectionRequest(EntityPlayerMP player, PacketGuiSelectRequest packetRequest) {
|
||||
if (packetRequest.getPrimaryIndex() == 0) {
|
||||
|
||||
Reference in new issue
Block a user