Fix Item Slot not registering changes properly

This commit is contained in:
Kam committed 2024-03-16 16:21:44 -04:00
1 parent 6f3b8f0a77
commit a872bc7035
3 files changed
+68 -22

No files matched your search

@@ -256,7 +256,7 @@ public class ScriptGui implements ICustomGui {
for(int i = 0; i < list.tagCount(); i++){
NBTBase b = list.getCompoundTagAt(i);
ScriptGuiComponent component = ScriptGuiComponent.createFromNBT((NBTTagCompound)b);
if (component != null) {
if (component != null && !(component instanceof ScriptGuiItemSlot)) {
components.put(component.getID(), component);
}
}
@@ -267,6 +267,7 @@ public class ScriptGui implements ICustomGui {
for(int i = 0; i < list.tagCount(); i++){
NBTBase b = list.getCompoundTagAt(i);
ScriptGuiItemSlot component = (ScriptGuiItemSlot)ScriptGuiComponent.createFromNBT((NBTTagCompound)b);
components.put(component.getID(), component);
slots.add(component);
}