Commit Graph
13 Commits
Author SHA1 Message Date
Kam 8da42e7b7c Merge branch 'janino-scripts' of https://github.com/KAMKEEL/CustomNPC-Plus into janino-scripts 2026-01-22 16:24:53 -05:00
Kam e6221c0940 Test Janino 2026-01-22 16:24:48 -05:00
bigguy345 a18292b8ed Used dynamic janino compiler for server side script handlers 2026-01-22 22:29:26 +02:00
somehussar 73f0d4e441 Bought goatee some braincells
He lost his from AI usage.
2026-01-22 21:14:50 +01:00
bigguy345 af62868387 1. JaninoHookResolver
2. Janino reflection based function calls like:

Color script = scriptHandler.callFunction("getColor", Color.class, ctx);

Compared to current:

Color script = scriptHandler.getScript().call(f -> f.getColor(ctx));
2026-01-19 03:26:02 +02:00
bigguy345 86285ceff5 - New JaninoScriptHandler thats a concrete IScriptHandler impl and replaces JaninoScriptable
- Removed ScriptHandler based methods from JaninoScript
2026-01-18 03:26:31 +02:00
bigguy345 a44cc4f1bb Passed default imports to JaninoScript 2026-01-14 03:03:34 +02:00
bigguy345 54d0fe2b1b Very first implementation of JaninoNpcScript 2026-01-14 00:24:38 +02:00
bigguy345 cc0959dcfe Added run(EnumScriptType, Event) and
run(String, Event) methods to IScriptUnit interface, with JaninoScript
delegating to callByHookType(). This provides a cleaner abstraction that
supports both ScriptContainer and JaninoScript without type checking.

Affected files:
- IScriptUnit: Added run() methods to interface
- JaninoScript: Implemented run() delegation methods
- DataScript, PlayerDataScript, GlobalNPCDataScript, ForgeDataScript
- EffectScript, LinkedItemScript, RecipeScript
- ScriptCustomItem, TileScripted: Refactored to use polymorphic calls
2026-01-14 00:16:58 +02:00
bigguy345 73db727c47 Deleagted all ScriptContainer NBT based creation to IScriptUnit.createFromNBT 2026-01-13 22:16:51 +02:00
bigguy345 92cd894f39 Improved JaninoScript hook generation 2026-01-13 21:39:04 +02:00
bigguy345 c3e032dcf2 Abstracted ScriptContainer & JaninoScript to IScriptUnit + global implementation 2026-01-13 18:25:28 +02:00
bigguy345 b5df6b1709 Moved all janino classes to CNPC+ janino-scripts branch 2026-01-09 23:44:07 +02:00