mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-19 11:59:11 +00:00
Batch Actions and Defer Registration of Slots (#72)
This commit is contained in:
1 parent
2e36fbcfcc
commit
a2a57d1656
22 files changed
+286
-119
No files matched your search
@@ -2,9 +2,11 @@ package binnie.extratrees.craftgui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
import binnie.core.craftgui.minecraft.InventoryType;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
import binnie.core.craftgui.minecraft.control.ControlErrorState;
|
||||
@@ -12,6 +14,7 @@ import binnie.core.craftgui.minecraft.control.ControlLiquidTank;
|
||||
import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.network.packet.MessageCraftGUI;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.machines.lumbermill.Lumbermill;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -38,15 +41,19 @@ public class WindowLumbermill extends Window {
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
|
||||
setTitle(Machine.getMachine(getInventory()).getPackage().getDisplayName());
|
||||
new ControlSlot(this, 42.0f, 43.0f).assign(Lumbermill.SLOT_WOOD);
|
||||
new ControlSlot(this, 148.0f, 43.0f).assign(Lumbermill.SLOT_PLANKS);
|
||||
new ControlSlot(this, 172.0f, 28.0f).assign(Lumbermill.SLOT_BARK);
|
||||
new ControlSlot(this, 172.0f, 58.0f).assign(Lumbermill.SLOT_SAWDUST);
|
||||
new ControlSlot(this, 42.0f, 43.0f).assign(actions, InventoryType.Machine, Lumbermill.SLOT_WOOD);
|
||||
new ControlSlot(this, 148.0f, 43.0f).assign(actions, InventoryType.Machine, Lumbermill.SLOT_PLANKS);
|
||||
new ControlSlot(this, 172.0f, 28.0f).assign(actions, InventoryType.Machine, Lumbermill.SLOT_BARK);
|
||||
new ControlSlot(this, 172.0f, 58.0f).assign(actions, InventoryType.Machine, Lumbermill.SLOT_SAWDUST);
|
||||
new ControlLumbermillProgress(this, 70.0f, 43.0f);
|
||||
new ControlLiquidTank(this, 16, 32);
|
||||
new ControlEnergyBar(this, 8, 112, 16, 60, Position.BOTTOM);
|
||||
new ControlPlayerInventory(this);
|
||||
new ControlErrorState(this, 95.0f, 73.0f);
|
||||
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user