Merge branch 'dev' into syntax-highlighter-unified

This commit is contained in:
bigguy345 committed 2026-03-09 07:37:50 +02:00
commit 45cda3cc90
13 files changed
+167 -25

No files matched your search

@@ -3,6 +3,7 @@ package noppes.npcs.controllers.data;
import kamkeel.npcs.network.packets.request.script.ChainedAbilityScriptPacket;
import net.minecraft.nbt.NBTTagCompound;
import noppes.npcs.constants.ScriptContext;
import noppes.npcs.janino.EventJaninoScript;
/**
* Script handler for chained ability scripts.
@@ -30,6 +31,11 @@ public class ChainedAbilityScript extends SingleScriptHandler implements IScript
this.chainId = chainId != null ? chainId : "";
}
@Override
public IScriptUnit createJaninoScriptUnit() {
return new EventJaninoScript(ScriptContext.CHAINED_ABILITY);
}
@Override
public ScriptContext getContext() {
return ScriptContext.CHAINED_ABILITY;
@@ -157,6 +157,17 @@ public interface IScriptUnit {
*/
void setErrored(boolean errored);
// ==================== INSTANCE SCOPE ====================
/**
* Create an instance-scoped copy of this script unit for isolated execution.
* The instance shares compiled code with the template but has isolated state.
*
* @param instanceHandler the script handler for the new instance
* @return a new IScriptUnit with isolated variable state
*/
IScriptUnit createInstanceScope(IScriptHandler instanceHandler);
// ==================== EXECUTION ====================
/**