Batch Actions and Defer Registration of Slots (#72)

This commit is contained in:
Julia authored and GitHub committed 2025-09-24 23:25:39 +02:00
1 parent 2e36fbcfcc
commit a2a57d1656
22 files changed
+286 -119

No files matched your search

@@ -6,6 +6,7 @@ import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagList;
import binnie.Binnie;
import binnie.botany.api.IFlower;
@@ -34,6 +35,7 @@ import binnie.core.craftgui.resource.minecraft.CraftGUITexture;
import binnie.core.craftgui.window.Panel;
import binnie.core.genetics.BreedingSystem;
import binnie.core.machines.inventory.SlotValidator;
import binnie.core.network.packet.MessageCraftGUI;
import binnie.core.util.I18N;
import binnie.genetics.Genetics;
import binnie.genetics.item.GeneticsItems;
@@ -170,11 +172,13 @@ public class WindowAnalyst extends Window {
x += 22;
}
} else {
new ControlSlot(this, x, y + 1).assign(InventoryType.Window, 0);
final NBTTagList actions = new NBTTagList();
new ControlSlot(this, x, y + 1).assign(actions, InventoryType.Window, 0);
x += 22;
new ControlSlot(this, x, y + 1).assign(InventoryType.Window, 1);
new ControlSlot(this, x, y + 1).assign(actions, InventoryType.Window, 1);
x += 26;
setupValidators();
MessageCraftGUI.sendToServer(actions);
}
tabBar = new Control(this, x, 28.0f, w() - 16.0f - x, 20.0f);
analystPanel = new Panel(this, 16.0f, 54.0f, 280.0f, 164.0f, MinecraftGUI.PanelType.Outline) {