mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 16:59:43 +00:00
Fixed script console not appearing with the new global script tab saving method.
This commit is contained in:
1 parent
79e13dfade
commit
de6375c4cb
10 files changed
+58
-47
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package noppes.npcs.client.gui.script;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.NBTTags;
|
||||
import noppes.npcs.client.Client;
|
||||
import noppes.npcs.constants.EnumPacketServer;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
@@ -20,6 +21,7 @@ public class GuiScriptAllNPCs extends GuiScriptInterface {
|
||||
if (!compound.hasKey("Tab")) {
|
||||
script.setLanguage(compound.getString("ScriptLanguage"));
|
||||
script.setEnabled(compound.getBoolean("ScriptEnabled"));
|
||||
script.setConsoleText(NBTTags.GetLongStringMap(compound.getTagList("ScriptConsole", 10)));
|
||||
super.setGuiData(compound);
|
||||
} else {
|
||||
int tab = compound.getInteger("Tab");
|
||||
@@ -45,6 +47,7 @@ public class GuiScriptAllNPCs extends GuiScriptInterface {
|
||||
NBTTagCompound scriptData = new NBTTagCompound();
|
||||
scriptData.setString("ScriptLanguage", this.script.getLanguage());
|
||||
scriptData.setBoolean("ScriptEnabled", this.script.getEnabled());
|
||||
scriptData.setTag("ScriptConsole", NBTTags.NBTLongStringMap(this.script.getConsoleText()));
|
||||
Client.sendData(EnumPacketServer.ScriptNPCSave, -1, scriptData);
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
package noppes.npcs.client.gui.script;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.NBTTags;
|
||||
import noppes.npcs.client.Client;
|
||||
import noppes.npcs.constants.EnumPacketServer;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
@@ -25,6 +26,7 @@ public class GuiScriptForge extends GuiScriptInterface {
|
||||
if (!compound.hasKey("Tab")) {
|
||||
script.setLanguage(compound.getString("ScriptLanguage"));
|
||||
script.setEnabled(compound.getBoolean("ScriptEnabled"));
|
||||
script.setConsoleText(NBTTags.GetLongStringMap(compound.getTagList("ScriptConsole", 10)));
|
||||
super.setGuiData(compound);
|
||||
} else {
|
||||
int tab = compound.getInteger("Tab");
|
||||
@@ -50,6 +52,7 @@ public class GuiScriptForge extends GuiScriptInterface {
|
||||
NBTTagCompound scriptData = new NBTTagCompound();
|
||||
scriptData.setString("ScriptLanguage", this.script.getLanguage());
|
||||
scriptData.setBoolean("ScriptEnabled", this.script.getEnabled());
|
||||
scriptData.setTag("ScriptConsole", NBTTags.NBTLongStringMap(this.script.getConsoleText()));
|
||||
Client.sendData(EnumPacketServer.ScriptForgeSave, -1, scriptData);
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ package noppes.npcs.client.gui.script;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.NBTTags;
|
||||
import noppes.npcs.client.Client;
|
||||
import noppes.npcs.constants.EnumPacketServer;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
@@ -27,6 +28,7 @@ public class GuiScriptPlayers extends GuiScriptInterface {
|
||||
if (!compound.hasKey("Tab")) {
|
||||
script.setLanguage(compound.getString("ScriptLanguage"));
|
||||
script.setEnabled(compound.getBoolean("ScriptEnabled"));
|
||||
script.setConsoleText(NBTTags.GetLongStringMap(compound.getTagList("ScriptConsole", 10)));
|
||||
super.setGuiData(compound);
|
||||
} else {
|
||||
int tab = compound.getInteger("Tab");
|
||||
@@ -52,6 +54,7 @@ public class GuiScriptPlayers extends GuiScriptInterface {
|
||||
NBTTagCompound scriptData = new NBTTagCompound();
|
||||
scriptData.setString("ScriptLanguage", this.script.getLanguage());
|
||||
scriptData.setBoolean("ScriptEnabled", this.script.getEnabled());
|
||||
scriptData.setTag("ScriptConsole", NBTTags.NBTLongStringMap(this.script.getConsoleText()));
|
||||
Client.sendData(EnumPacketServer.ScriptPlayerSave, -1, scriptData);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user