Revert "Made player script implementation closer to that of 1.12."

This reverts commit 3a9789b3fd.
This commit is contained in:
luisc committed 2021-12-16 04:05:05 -06:00
1 parent 3a9789b3fd
commit 6bdc68337c
12 files changed
+120 -90

No files matched your search

@@ -145,11 +145,12 @@ public class PacketHandlerServer{
private void playerScriptPackets(EnumPacketServer type, ByteBuf buffer, EntityPlayerMP player) throws Exception {
NBTTagCompound compound;
if (type == EnumPacketServer.ScriptPlayerGet) {
compound = ScriptController.Instance.playerScripts.writeToNBT(new NBTTagCompound());
if(type == EnumPacketServer.ScriptPlayerGet) {
PlayerDataScript data = ScriptController.Instance.playerScripts;
compound = data.writeToNBT(new NBTTagCompound());
compound.setTag("Languages", ScriptController.Instance.nbtLanguages());
Server.sendData(player, EnumPacketClient.GUI_DATA, new Object[]{compound});
} else if (type == EnumPacketServer.ScriptPlayerSave) {
Server.sendData(player, EnumPacketClient.GUI_DATA, compound);
} else if(type == EnumPacketServer.ScriptPlayerSave) {
ScriptController.Instance.setPlayerScripts(Server.readNBT(buffer));
}
}