mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-20 04:10:07 +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,10 +2,12 @@ package binnie.genetics.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.GUIIcon;
|
||||
import binnie.core.craftgui.minecraft.InventoryType;
|
||||
import binnie.core.craftgui.minecraft.MinecraftGUI;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.core.craftgui.minecraft.control.ControlEnergyBar;
|
||||
@@ -19,6 +21,7 @@ import binnie.core.craftgui.minecraft.control.ControlSlotCharge;
|
||||
import binnie.core.craftgui.resource.Texture;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.core.craftgui.window.Panel;
|
||||
import binnie.core.network.packet.MessageCraftGUI;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extrabees.core.ExtraBeeTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
@@ -47,13 +50,16 @@ public class WindowAnalyser extends WindowMachine {
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
super.initialiseClient();
|
||||
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
|
||||
WindowAnalyser.progressBase = new StandardTexture(0, 51, 66, 40, GeneticsTexture.GUIProcess.getTexture());
|
||||
WindowAnalyser.progress = new StandardTexture(66, 51, 66, 40, GeneticsTexture.GUIProcess.getTexture());
|
||||
int x = 16;
|
||||
int y = 32;
|
||||
new ControlSlotArray(this, x, y, 2, 3).create(Analyser.SLOT_RESERVE);
|
||||
x += 28;
|
||||
new ControlSlot(this, x, y + 54 + 8).assign(13);
|
||||
new ControlSlot(this, x, y + 54 + 8).assign(actions, InventoryType.Machine, 13);
|
||||
new ControlSlotCharge(this, x + 20, y + 54 + 8, 13).setColor(10040319);
|
||||
new ControlEnergyBar(this, x + 24 + 16, y + 54 + 8 + 1, 60, 16, Position.LEFT);
|
||||
new ControlErrorState(this, x + 24 + 16 + 60 + 16, y + 54 + 8 + 1);
|
||||
@@ -62,11 +68,13 @@ public class WindowAnalyser extends WindowMachine {
|
||||
x += 56;
|
||||
new Panel(this, x, y, 76.0f, 50.0f, MinecraftGUI.PanelType.Tinted);
|
||||
new ControlProgress(this, x + 5, y + 5, WindowAnalyser.progressBase, WindowAnalyser.progress, Position.LEFT);
|
||||
new ControlSlot(this, x + 38 - 9, y + 25 - 9).assign(Analyser.SLOT_TARGET);
|
||||
new ControlSlot(this, x + 38 - 9, y + 25 - 9).assign(actions, InventoryType.Machine, Analyser.SLOT_TARGET);
|
||||
new ControlIconDisplay(this, x + 76 + 2, y + 18, GUIIcon.ArrowRight.getIcon());
|
||||
x += 96;
|
||||
new ControlSlotArray(this, x, y, 2, 3).create(Analyser.SLOT_FINISHED);
|
||||
new ControlPlayerInventory(this);
|
||||
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user