mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 02:39:05 +00:00
Fix Scripting Config Syncing Issues & Fixed Auction Tooltip Rendering Bugs
This commit is contained in:
1 parent
449a10711e
commit
83b86a4538
22 files changed
+353
-202
No files matched your search
@@ -0,0 +1,25 @@
|
||||
package noppes.npcs.controllers;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.config.ConfigScript;
|
||||
|
||||
/**
|
||||
* Server-side utility for syncing script configuration to clients.
|
||||
*
|
||||
* This class is SERVER-SIDE ONLY. Client reads via ScriptClientConfig.
|
||||
*/
|
||||
public class ScriptConfigSync {
|
||||
|
||||
/**
|
||||
* Write script config to NBT for sending to client.
|
||||
* Called on server side when building login packet.
|
||||
*/
|
||||
public static NBTTagCompound writeToNBT(NBTTagCompound compound) {
|
||||
compound.setBoolean("ScriptingEnabled", ConfigScript.ScriptingEnabled);
|
||||
compound.setBoolean("RunLoadedScriptsFirst", ConfigScript.RunLoadedScriptsFirst);
|
||||
compound.setBoolean("GlobalPlayerScripts", ConfigScript.GlobalPlayerScripts);
|
||||
compound.setBoolean("GlobalForgeScripts", ConfigScript.GlobalForgeScripts);
|
||||
compound.setBoolean("GlobalNPCScripts", ConfigScript.GlobalNPCScripts);
|
||||
return compound;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user