New IScriptHandlerPacket:

- Defines the packet-backed script GUI contract used by GuiScriptInterface for “streamed” script loading/saving.

- Updated EffectScript, LinkedItemScript and RecipeScript to implement IScriptHandlerPacket

- Removed GuiScriptEffect, GuiScriptLinkedItem and GuiScriptRecipe as their functionality got replaced with new interface handled by GuiScriptInterface
This commit is contained in:
bigguy345 committed 2026-01-18 17:57:10 +02:00
1 parent eecb5b0b3b
commit f5dbe19de2
11 files changed
+260 -437

No files matched your search

@@ -7,7 +7,8 @@ import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.util.ResourceLocation;
import noppes.npcs.client.ClientCacheHandler;
import noppes.npcs.client.gui.global.GuiNPCManageEffects;
import noppes.npcs.client.gui.script.GuiScriptEffect;
import noppes.npcs.client.gui.script.GuiScriptInterface;
import noppes.npcs.controllers.data.EffectScript;
import noppes.npcs.client.gui.util.GuiMenuTopButton;
import noppes.npcs.client.gui.util.GuiNpcButtonYesNo;
import noppes.npcs.client.gui.util.GuiNpcLabel;
@@ -202,10 +203,7 @@ public class SubGuiEffectGeneral extends SubGuiInterface implements ITextfieldLi
}
if (id == -2) {
PacketClient.sendClient(new EffectSavePacket(effect.writeToNBT(false), originalName));
GuiScriptEffect scriptGUI = new GuiScriptEffect(parent, effect);
scriptGUI.setWorldAndResolution(mc, width, height);
scriptGUI.initGui();
mc.currentScreen = scriptGUI;
GuiScriptInterface.open(parent, new EffectScript(effect.id));
}
if (id == 10) {
GuiNpcButtonYesNo button = (GuiNpcButtonYesNo) guibutton;