Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
363 commits
Select commit Hold shift + click to select a range
8089a5e
Fully migrated to drawStringHex for Script Editor line rendering
bigguy345 Dec 31, 2025
ef4438f
Optimised scrolling animation variables to fix the line text's stutte…
bigguy345 Dec 31, 2025
6c0a2ca
Quick re-organisation
bigguy345 Dec 31, 2025
4ff4745
Detected bodyless Methods declared within interfaces/have abstract mo…
bigguy345 Dec 31, 2025
002d2a6
Optimised ScriptType member detection
bigguy345 Dec 31, 2025
20f1c7c
Detected duplicate methods for ScriptTypeInfo methods
bigguy345 Dec 31, 2025
c97de07
Added MISSING_BODY error for method declarations
bigguy345 Dec 31, 2025
6cdb222
Added INTERFACE_METHOD_BODY error & improved logic
bigguy345 Dec 31, 2025
dfec28c
Switched method fetches to getAllMethods()
bigguy345 Dec 31, 2025
8e283b7
Removed unused code
bigguy345 Dec 31, 2025
71b4a6f
Huge ScriptType extends/implements back-end
bigguy345 Dec 31, 2025
0caebb0
Vastly improved GutterIconRenderer
bigguy345 Dec 31, 2025
35af0bb
Got error validation working for ScriptTypeInfo
bigguy345 Dec 31, 2025
861cdcd
Moved all inheritance code to ScriptTypeInfo
bigguy345 Dec 31, 2025
7b77c19
Added super() error validation
bigguy345 Dec 31, 2025
275a5f1
Retrieved true containing type of method calls in hover info (handled…
bigguy345 Dec 31, 2025
86da3f2
Added bold/italic rendering for TokenType
bigguy345 Jan 1, 2026
58cac36
Added ENUM CONSTANT parsing and validation
bigguy345 Jan 2, 2026
96c243f
OOPS
bigguy345 Jan 2, 2026
75c5637
Added FieldInfo initStart/initEnd for enum constants
bigguy345 Jan 2, 2026
d3a1535
EnumConstantInfo as token metadata
bigguy345 Jan 2, 2026
aaaeaf4
Added hover info for enum constants
bigguy345 Jan 2, 2026
8d2d08b
Unified package name fetching across TokenHoverInfo extractors
bigguy345 Jan 2, 2026
369b346
Removed if (getErrors().stream().anyMatch(err -> err.contains("Canno…
bigguy345 Jan 2, 2026
fd160e9
Stored EnumConstantInfo in FieldInfo
bigguy345 Jan 2, 2026
5553ece
Processed external/java class enums properly
bigguy345 Jan 2, 2026
ca11c3c
Added script enums to ScriptType's field pool
bigguy345 Jan 2, 2026
5e13f58
Removed token EnumConstantInfo as no longer needed
bigguy345 Jan 2, 2026
fbbd53d
Removed unneeded enum constructor creation
bigguy345 Jan 2, 2026
4e0c5e9
Cleaned up markChainedAccessFields heavily
bigguy345 Jan 2, 2026
9a57591
Refined FieldChainMarker
bigguy345 Jan 2, 2026
e322863
oops forgor
bigguy345 Jan 2, 2026
5be3d93
Marked global variables for script types
bigguy345 Jan 2, 2026
4f00870
Improved marking logic of ALL variables in all scopes
bigguy345 Jan 2, 2026
791cb3d
Provided correct metadata for enum constant marks
bigguy345 Jan 2, 2026
b6f69db
Fixed constructors buggin (is already defined in scope for all single…
bigguy345 Jan 2, 2026
1c3a11d
Fixed parameters not highlighting for constructors
bigguy345 Jan 2, 2026
bc6e978
Fixed error hover info for enums being broken
bigguy345 Jan 2, 2026
931858c
Returned unresolved TypeInfo for types not found
bigguy345 Jan 2, 2026
4146b15
Removed "final" and "extends Enum" from enum hover info
bigguy345 Jan 2, 2026
b613ec8
drawn KEYWORD token color for primitive types in hover info
bigguy345 Jan 3, 2026
df88331
Fixed IndexOutOfBounds
bigguy345 Jan 3, 2026
f3ba050
Fixed IndexOutOfBounds
bigguy345 Jan 3, 2026
aeda4f0
Fixed parseLocalFields breaking with generics list List<String>
bigguy345 Jan 3, 2026
cf4f4a4
Marked all un-marked identifiers as UNDEFINED
bigguy345 Jan 3, 2026
6948690
Proper enum formatting for hover info
bigguy345 Jan 3, 2026
79d1b74
JS PARSER MK.I
bigguy345 Jan 3, 2026
2361246
LMAO Autocompletion Bar LMFAO
bigguy345 Jan 3, 2026
c4d5178
Moved KeyPrest isDown handling to KeyState
bigguy345 Jan 3, 2026
85d79dd
Disabled script area textbox typing when a matching keycode KeyPreset…
bigguy345 Jan 3, 2026
ea38cd2
Rendered Script Text Areas last thing in GuiNpcInterface
bigguy345 Jan 3, 2026
117f850
Added mouse drag to autocomplete scroll bar
bigguy345 Jan 3, 2026
d1db206
oops forgor
bigguy345 Jan 3, 2026
82632d9
Made Autocomplete respect static/non static contexts
bigguy345 Jan 3, 2026
5163044
Added args to autocomplete methods and highlighted them in dark gray
bigguy345 Jan 3, 2026
b42cd4d
Dismissed AutoCompleteManager on gui init/window resize
bigguy345 Jan 3, 2026
297c812
Autocomplete ignores whitespaces between cursor and receiver "Minecra…
bigguy345 Jan 3, 2026
bf858a7
Removed AutoComplete list limit
bigguy345 Jan 3, 2026
a411200
OOps wrong logic
bigguy345 Jan 3, 2026
ef51f4a
Fixed buttons drawn under AutoComplete drop down being clickable thro…
bigguy345 Jan 3, 2026
9886dae
Moved fullScreenButton rendering into GuiScriptTextArea
bigguy345 Jan 4, 2026
02ce091
Got backspace + autocomplete (CTRL SPACE) working, now functions when…
bigguy345 Jan 4, 2026
ff7fbd4
Smart tab completion: replace till next separator
bigguy345 Jan 4, 2026
5332774
Made ENUM constants highest priority in autocomplete dropdown menu
bigguy345 Jan 4, 2026
acae8d8
Removed duplicate enums
bigguy345 Jan 4, 2026
04a0fbc
CRAZY !!! ClassIndex for class auto-import suggestions by matching pr…
bigguy345 Jan 4, 2026
ac92210
Implemented AUTO IMPORT SUGGESTION COMPLETIONS
bigguy345 Jan 4, 2026
a496061
Added auto complete strict matching for non-member access first word.
bigguy345 Jan 4, 2026
7b7667f
Autocomplete suggestions UsageTracker implementation
bigguy345 Jan 4, 2026
6e602c4
Penalized auto complete static members when in a non-static context
bigguy345 Jan 4, 2026
5bc3e54
Lowered static penalty for strong prefix matches (so it pops to the top)
bigguy345 Jan 4, 2026
461e45c
ClassIndex Package exclusions
bigguy345 Jan 4, 2026
db3a7de
Drawn static/final denoters to AutocompleteItems
bigguy345 Jan 4, 2026
6d150a9
Truncated AutocompleteItems text
bigguy345 Jan 4, 2026
3437992
Inherited Object methods deprioritized: Methods from Object class tha…
bigguy345 Jan 4, 2026
080b41a
Accounted for method parameter count in UsageTracker
bigguy345 Jan 4, 2026
a36cc04
Shoved object methods all the way down in autocomplete menu
bigguy345 Jan 4, 2026
0d45d63
Used correct enum class name
bigguy345 Jan 4, 2026
c56a8ee
Added ScriptType enums to autocmpletion
bigguy345 Jan 4, 2026
50bcbb5
Bunch of JS fixes
bigguy345 Jan 4, 2026
61a363f
A bunch of JS parser fixes and improvements
bigguy345 Jan 4, 2026
b3d4994
Fixed broken .d.ts parsing pattern, bec files like IPlayer.d.ts weren…
bigguy345 Jan 4, 2026
f9babf0
temp JS/java merger
bigguy345 Jan 4, 2026
1221bad
Unified Java/JS handling into ScriptDocument. much better now.
bigguy345 Jan 4, 2026
bbe6d9b
JSAutoCompleteProvier revamp:
bigguy345 Jan 4, 2026
b267ebe
More JSAutocompleteProvider cleanup
bigguy345 Jan 4, 2026
f880211
Fixed indexOutOfbounds crash
bigguy345 Jan 4, 2026
eea82a6
Recursively loaded all .d.ts files from assets/customnpcs/api/
bigguy345 Jan 4, 2026
5f4bc81
Umm forgot some stuff from last commit
bigguy345 Jan 4, 2026
150ffbc
Improved resolveInheritance logic
bigguy345 Jan 4, 2026
92a196d
Expanded parser scope + added class parsing
bigguy345 Jan 4, 2026
9c222b8
proper JS type names in HoverInfo/Autocomplete
bigguy345 Jan 4, 2026
4d78c6b
Removed duplicate return type for JS method AutocompleteItem
bigguy345 Jan 4, 2026
87931e6
Prioritized JS members by inheritance depth (child class members first)
bigguy345 Jan 5, 2026
ad5528c
Skipped method calls in method declarations
bigguy345 Jan 5, 2026
662d874
Added documentation for JS fields/functions
bigguy345 Jan 5, 2026
b6d0d77
Fixed = sign missing in JS var declaration assignment
bigguy345 Jan 5, 2026
6bc9327
Checked duplicate methods for JS
bigguy345 Jan 5, 2026
565d527
Added "any" type for JS which is universally compatible with any type…
bigguy345 Jan 5, 2026
35ca7ca
Completely functional JSDoc parsing/stub auto generation for function…
bigguy345 Jan 5, 2026
761b594
lil tweak
bigguy345 Jan 5, 2026
cd942fe
Inferred type of 'any' vars upon their first assignment
bigguy345 Jan 5, 2026
5720b3a
Added @type JSDOC stub auto generation for fields
bigguy345 Jan 5, 2026
3929888
Removed redundant JS type resolution code and improved logic
bigguy345 Jan 5, 2026
7aeb003
Merge branch 'dev' into syntax-highlighter-unified
bigguy345 Jan 5, 2026
33442f9
Merge branch 'dev' into syntax-highlighter-unified
bigguy345 Jan 5, 2026
ce3700b
Fixed hoverinfo not showing on JS method declarations
bigguy345 Jan 5, 2026
830f2a3
Stored JSDocInfo in FieldInfo and MethodInfo
bigguy345 Jan 5, 2026
4741b58
Fixed description not being stored for JSDocTypeTag
bigguy345 Jan 5, 2026
9b1ffb4
-Fixed JSDocTypeTag type not being marked properly
bigguy345 Jan 5, 2026
edffd7a
JSDoc tag rendering for HoverInfo
bigguy345 Jan 5, 2026
3ee6b69
renamerefactor aint workin for JSDoc parameter name
bigguy345 Jan 5, 2026
4726c23
Got refactoring func param name working for JSDoc param name
bigguy345 Jan 6, 2026
bdda92c
Fixed type aliases and nested interfaces not being properly read from…
bigguy345 Jan 6, 2026
c10fa8e
Added global engine objects to JSTypeRegistry and marked them properl…
bigguy345 Jan 6, 2026
beefd35
actually nvm
bigguy345 Jan 6, 2026
35c2a08
Added AbstractDBCAPI.d.ts (DBCAPI fully functional)
bigguy345 Jan 6, 2026
e883b77
Improved AbstractNpcApi.d.ts
bigguy345 Jan 6, 2026
79ed8b1
gitignore
bigguy345 Jan 6, 2026
f0ec2b0
removed tags
bigguy345 Jan 6, 2026
274e96a
generateTypeScriptDefinitions gradle task
bigguy345 Jan 7, 2026
df0cc66
Removed DBC Addon .d.ts files
bigguy345 Jan 7, 2026
c433593
Added net.minecraft to CNPC+ .d.ts apiPackages
bigguy345 Jan 7, 2026
7d6bacb
Fixed StackOverflows
bigguy345 Jan 7, 2026
2311634
Revert "Fixed StackOverflows"
bigguy345 Jan 7, 2026
b74a29d
Expanded namespace pattern
bigguy345 Jan 7, 2026
57d6384
Removed redundant unused .d.ts files
bigguy345 Jan 7, 2026
8fb683f
Dynamic AutocompleteMenu dimension adjustment depending on available …
bigguy345 Jan 7, 2026
798e238
Parsed generic type parameters in .d.ts files. i.e. IPlayer<T extends…
bigguy345 Jan 7, 2026
7725d16
Implemented TypeParamInfo to TypeInfo and JSTypeInfo, and resolved al…
bigguy345 Jan 8, 2026
2632ff4
Added type parameter TypeInfo fetching to MethodInfo
bigguy345 Jan 8, 2026
99f7d05
Properly resolved type parameters for autocomplete display (e.g., T →…
bigguy345 Jan 8, 2026
869dda3
-Java class types can are now functional in JS API. (Autocomplete and…
bigguy345 Jan 8, 2026
e45f6b7
Forgot this from last commit
bigguy345 Jan 8, 2026
9eb30f8
Fixed AutocompleteManager breaking in findReceiverExpression if it co…
bigguy345 Jan 8, 2026
5790679
Properly setup autocompletion member suggestion for java classes in J…
bigguy345 Jan 8, 2026
176a3b6
- Added Java.type("") for JS API
bigguy345 Jan 8, 2026
bfcdd3c
- Set vars assigned with type ClassTypeInfo (e.g.Java.type("")) as st…
bigguy345 Jan 8, 2026
277fe33
oops forgot important class
bigguy345 Jan 9, 2026
c661bc9
Small AutocompleteMenu draw bug
bigguy345 Jan 9, 2026
5c604a6
Colored return type of members in Autocomplete menu according to thei…
bigguy345 Jan 9, 2026
1e84444
Colored Autocomplete items according to their token types
bigguy345 Jan 9, 2026
0f27ef2
Merge branch 'janino-scripts' into syntax-highlighter-unified
bigguy345 Jan 9, 2026
bd0e8ad
gitignore
bigguy345 Jan 9, 2026
c2435b3
Removed .d.s files for clean merge sake
bigguy345 Jan 9, 2026
9454af3
Moved SubGuiSelectList to CNPC+
bigguy345 Jan 10, 2026
95f550d
Moved SubGuiSelectList to CNPC+
bigguy345 Jan 10, 2026
0393550
Pushed local dts plugin with settings.gradle configured to use locally
bigguy345 Jan 10, 2026
55ae325
Removed duplicate class
bigguy345 Jan 10, 2026
289c78f
Proper TypeInfo getter for synthetic type members
bigguy345 Jan 10, 2026
a106343
NashornBuiltins fixes
bigguy345 Jan 10, 2026
a5c02e6
Fixed static access problem for AutocompleteProvider & generally
bigguy345 Jan 10, 2026
71050da
Fixed findReceiverExpr breaking when contains strings
bigguy345 Jan 10, 2026
78f7fa6
Add Script Context and better parsing for d.ts handling
KAMKEEL Jan 10, 2026
0d11db7
Merge remote-tracking branch 'origin/syntax-highlighter-unified' into…
bigguy345 Jan 10, 2026
576401e
Added object instantiation for Jave.type: i.e.
bigguy345 Jan 10, 2026
5b36cda
Made ScriptContext class based instead
bigguy345 Jan 10, 2026
06aa0ce
Annotations for API events
bigguy345 Jan 10, 2026
c82f751
Revert "Annotations for API events"
bigguy345 Jan 10, 2026
3ef16fb
submodules
bigguy345 Jan 11, 2026
4311931
Made these 3 detached GuiScripts depend on GuiScriptInterface
bigguy345 Jan 12, 2026
ecf1b38
GuiScript now extends GuiScriptInterface + Full screen support
bigguy345 Jan 12, 2026
818acfb
Abstracted ScriptContainer & JaninoScript to IScriptUnit + global imp…
bigguy345 Jan 13, 2026
83e11a0
Merge branch 'refs/heads/dev' into syntax-highlighter-unified
bigguy345 Jan 13, 2026
95e7b32
resolved merge conflicts with dev
bigguy345 Jan 13, 2026
0a33f7d
Merge branch 'janino-scripts' into syntax-highlighter-unified
bigguy345 Jan 13, 2026
21e0557
merge conflicts
bigguy345 Jan 13, 2026
165e3e2
Passed default imports to JaninoScript
bigguy345 Jan 14, 2026
26a9c99
All Imports used in JaninoScript implementations (param types/return …
bigguy345 Jan 14, 2026
9623911
OMG janino-scripts-final merge
bigguy345 Jan 23, 2026
190fa54
HookDefinition requiredImports now has both enclosed type & enclosing…
bigguy345 Jan 23, 2026
d3f06f8
Reverted hook list scroll fix (cause it works fine without it)
bigguy345 Jan 23, 2026
6d62a44
getHookTypes is now cached imports based
bigguy345 Jan 23, 2026
b7a46ca
Added more JSDoc tags : @see, @deprecated, @since
bigguy345 Jan 23, 2026
ff68dc9
Parsed all JSDoc info for all members of all .d.ts files. Documentati…
bigguy345 Jan 23, 2026
8799e08
Expanded scope of DTSJSDocParser type/param patterns so they are more…
bigguy345 Jan 24, 2026
021a32b
Added JSDocInfo for TypeInfo too
bigguy345 Jan 24, 2026
1b9e674
Proper parsing for generic JSDoc tags like "@word this is a tag"
bigguy345 Jan 24, 2026
64f8ca6
Parsed fully qualified name of API java classes in .d.ts files
bigguy345 Jan 24, 2026
3f6972f
Bridged over JSDocs/param names for fields/methods of java reflected …
bigguy345 Jan 24, 2026
52db241
DtsJavaBridge interface/superclass fallback
bigguy345 Jan 24, 2026
26bf90a
Improved TokenHoverRenderer box height calculations
bigguy345 Jan 24, 2026
0d1520d
Merge branch 'dev' into syntax-highlighter-unified
bigguy345 Jan 24, 2026
b86c028
Loaded all .d.ts files in assets/modId/api directory of ALL loaded mods
bigguy345 Jan 24, 2026
f1a968d
Got bridges working for new JSTypeRegistry domains (.d.ts files of ea…
bigguy345 Jan 24, 2026
f43b9ae
Allowed for .d.ts patches to be applied and merge into existing types
bigguy345 Jan 25, 2026
46b62ee
Bridged .d.ts patch overrides to java side to show in autocomplete/ho…
bigguy345 Jan 25, 2026
39a43a3
Merge branch 'dev' into syntax-highlighter-unified
bigguy345 Jan 25, 2026
df0d46e
Properly parsed enclosed namespace types like INpcEvent.UpdateEvent a…
bigguy345 Jan 26, 2026
aae2fdb
Added DataScript global definitions i.e. npc, world, event to syntax …
bigguy345 Jan 26, 2026
76b6dae
Added API global engine objects and DataScript global definitions as …
bigguy345 Jan 26, 2026
bd1743d
Penalised keyword items in autocomplete suggestions
bigguy345 Jan 26, 2026
3f204d4
Removed redundant fullScreenButton.draw calls, already drawn in GuiSc…
bigguy345 Jan 26, 2026
8fa22e1
Moved fullscreen button mouseClicked into GuiScriptTextArea
bigguy345 Jan 26, 2026
ac8228e
Properly ordered mouse clicked components
bigguy345 Jan 26, 2026
4245f5b
Improved fullscreen mode for legacy GuiScript
bigguy345 Jan 26, 2026
6f1fc08
init'd JSTypeRegistry on game load
bigguy345 Jan 26, 2026
720d0dc
On Autocomplete insertion, set cursor carat inside () if method has p…
bigguy345 Jan 26, 2026
940dc01
DELETE_LINE, MOVE_LINE_UP and MOVE_LINE_DOWN KeyPresets
bigguy345 Jan 26, 2026
8b5d3a2
Copy with no selection now copies whole line, and pastes to a new line
bigguy345 Jan 26, 2026
1863038
Atomic UNDO/REDO for all typed text (operates on entire words at once…
bigguy345 Jan 26, 2026
ce7566e
CTRL + Click on fields/methods/type to go to definition
bigguy345 Jan 26, 2026
83a54c1
forgot this from autocomplete insertion carat between () commit
bigguy345 Jan 26, 2026
ea8cc51
Prevented auto pair insertion of '', "", [], () blocks in excluded ra…
bigguy345 Jan 26, 2026
235fd3b
Improved comment/string excluded range detection for auto-pair insertion
bigguy345 Jan 26, 2026
1e96a21
Added JS overloads to autocomplete properly
bigguy345 Jan 26, 2026
5795cc9
Completely parsed type generics.
bigguy345 Jan 27, 2026
19cdf19
wtf
bigguy345 Jan 27, 2026
125a799
Optimised and refined type generics parsing. Removed bloat and added …
bigguy345 Jan 28, 2026
969d82d
Fixed visual hover info bugs for generics
bigguy345 Jan 28, 2026
6c5a269
Fixed Autocomplete suggestions not working when whitespaces exist bet…
bigguy345 Jan 28, 2026
9e04a11
Lambda impl Phase 1: Track inner callables as nested scopes so parame…
bigguy345 Jan 28, 2026
62d87c0
Added comment/multi-line handling for Autocomplete findReceiverExpres…
bigguy345 Jan 28, 2026
98351bb
dev merge
bigguy345 Feb 3, 2026
d63a1b8
hussar bukkit fixes
bigguy345 Feb 3, 2026
4e78ffb
Fix autocomplete trigger after dot
bigguy345 Feb 3, 2026
074c780
Add inner callable scope locals and expression type resolution
bigguy345 Feb 3, 2026
9e4692d
Support d.ts patch overlays in gradle plugin
bigguy345 Feb 3, 2026
9db8a0b
Forgotten Merge resolution for 'Add Tooltips.' commit
bigguy345 Feb 3, 2026
ba7e4cc
Merge remote-tracking branch 'origin/dev' into syntax-highlighter-uni…
bigguy345 Feb 3, 2026
6fc0bf4
Fix expression typing gate to route JS function/lambda expressions in…
bigguy345 Feb 3, 2026
7f4bc87
Extract overload selection to OverloadSelector helper with scoring al…
bigguy345 Feb 3, 2026
bd9d0a3
Merge branch 'dev' into syntax-highlighter-unified
bigguy345 Feb 4, 2026
df578be
wtf who added this
bigguy345 Feb 4, 2026
d2713b4
Generated API .d.ts files on processResources task
bigguy345 Feb 4, 2026
b63d76b
Merge branch 'dev' into syntax-highlighter-unified
bigguy345 Feb 4, 2026
476c672
Merge branch 'dev' into syntax-highlighter-unified
KAMKEEL Feb 4, 2026
0be0508
Update build.gradle
KAMKEEL Feb 4, 2026
ba23b9f
1.11 Update Highlighting
KAMKEEL Feb 4, 2026
105d274
Merge branch 'dev' into syntax-highlighter-unified
KAMKEEL Feb 13, 2026
bc9fd53
Beta 2
KAMKEEL Feb 13, 2026
f16c8ae
Merge branch 'dev' into syntax-highlighter-unified
KAMKEEL Feb 13, 2026
185d915
refactor: simplify NBT reading for ability properties and potion effects
KAMKEEL Feb 13, 2026
f4d7861
fix: prevent special key detection when a screen is open
KAMKEEL Feb 13, 2026
09ab645
refactor: enhance collision detection for ability movement
KAMKEEL Feb 13, 2026
ab1f0d7
Merge branch 'dev' into syntax-highlighter-unified
KAMKEEL Feb 13, 2026
0b0dcdc
feat: implement player ability state management with rotation and pos…
KAMKEEL Feb 14, 2026
9fcda98
fix: convert gradle-plugins from directory to submodule
KAMKEEL Feb 14, 2026
85874d4
Merge branch 'dev' into syntax-highlighter-unified
KAMKEEL Feb 14, 2026
5a9b9a1
Merge branch 'dev' into syntax-highlighter-unified
KAMKEEL Feb 15, 2026
2a5dd6d
Merge branch 'dev' into syntax-highlighter-unified
KAMKEEL Feb 16, 2026
e2b35d6
Method reference and SAM type resolution
bigguy345 Feb 18, 2026
430ff7c
Improve autocomplete for method reference contexts
bigguy345 Feb 18, 2026
b4c0859
Merge remote-tracking branch 'origin/syntax-highlighter-unified' into…
bigguy345 Feb 18, 2026
375c41d
Merge branch 'dev' into syntax-highlighter-unified
bigguy345 Feb 18, 2026
df6beb4
Merge branch 'dev' into syntax-highlighter-unified
KAMKEEL Feb 19, 2026
4764b8e
Enabled script console
bigguy345 Feb 19, 2026
6c12c9e
Merge remote-tracking branch 'origin/syntax-highlighter-unified' into…
bigguy345 Feb 19, 2026
c2f9fdb
Merge branch 'dev' into syntax-highlighter-unified
KAMKEEL Feb 20, 2026
1e8844a
Merge branch 'dev' into syntax-highlighter-unified
KAMKEEL Feb 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ run
src/main/resources/assets/customnpcs/api
df/
tmp/
src/test

92 changes: 92 additions & 0 deletions 1.11_Beta_Update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# CNPC+ 1.11 Beta - The Scripting Update

🟡 **In Testing**



## Features: ⚒️

- **Syntax Highlighting:**

> Full color-coded script editor. Keywords, types, variables, methods, strings, and comments are all distinct. Scope-aware coloring distinguishes local fields from globals and chained method calls.



- **Autocomplete:**

> Smart suggestions as you type. Context-aware for static vs instance access, shows method parameters, resolves chained calls, and suggests auto imports for classes. Frequently used members prioritized.



- **Error Detection:**

> Catch mistakes before running. Type mismatches, wrong arguments, missing methods, unused imports, duplicate definitions, and more -- all underlined with hover messages explaining the issue.



- **Hover Information:**

> Hover any symbol to see its type, documentation, and declaration. Works on methods, fields, classes, and even generics. Click to pin tooltips in place.



- **Script Editor Overhaul:**

> - **Line Numbers** - Gutter with current line highlighting.
> - **Go To Line** - CTRL+G to jump to any line.
> - **Search & Replace** - CTRL+F / CTRL+H with real-time highlighting.
> - **Go To Definition** - CTRL+Click to jump to any symbol.
> - **Smart Undo/Redo** - Word-level instead of character-level.
> - **Line Operations** - Duplicate, delete, move up/down.
> - **Comment Toggle** - CTRL+/ for selected lines.
> - **Rename** - Rename a symbol across all occurrences.
> - **Smooth Scrolling** - Eased scroll animation.
> - **Indent Guides** - Scope-highlighted vertical indent lines.
> - **Brace Matching** - Highlighted pairs, red for unclosed.
> - **Smart Brackets** - Auto-pairing for `{}`, `()`, `[]`, `""`, `''`.
> - **Fullscreen Mode** - Expand editor to fill the game window.
> - **Shortcut Overlay** - View all keyboard shortcuts at a glance.



- **Java Scripting (Janino):**

> Write scripts in real Java compiled at runtime. Name methods after hooks for automatic wiring. Language selector per tab to switch between Java and JavaScript. External `.java` file support.



- **Client-Side Scripting:**

> Run scripts on the client for responsive experiences. Server-controlled -- off by default, must be explicitly enabled. Script files sync automatically on login and reload.



- **Cloner Tab Overhaul:**

> Folder-based organization for saved NPCs, items, and entries. Full-width directory browser for large collections. Improved tab navigation.



- **Addon API Support:**

> Addons can ship type definitions that load into the script editor automatically. Full autocomplete, hover info, and documentation for addon APIs. Addons can extend existing CNPC+ types with new methods.



- **Animation Improvements:**

> Data store for passing data across animation events and frames. New consumer-based task system for animation lifecycle. Expanded scripting API for animation control.



**Extras**

- Player Dialog Events now work like NPC Dialog Events.
- Attack speed configuration for linked items.
- Client-side balance prediction during Trader interactions.
- Right-click cycling on multi-option NPC buttons (Hair, Eyes, Fur, etc.).
- Fixed quest cooldown for MC Custom and RL Custom timer types.
- Fixed Bard music restarting when opening dialogs.
- Fixed NPC biome spawn settings not saving after editing.
- Fixed block waypoint issues.
- Fixed script config syncing between server and client.
118 changes: 118 additions & 0 deletions 1.11_Update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# ✏️ CustomNPC+ 1.11 - The Scripting Update ✏️

---

The **Scripting Update** completely transforms how you write scripts in CNPC+! A brand new **Script Editor** with **syntax highlighting**, **autocomplete**, and **error detection** makes scripting feel like a real IDE. Write scripts in **Java** with the new Janino engine, enable **client-side scripting** for responsive experiences, and organize your Cloner with **folders**!

---

## Script Editor 📝

The script editor has been rebuilt from the ground up into a **full-featured code editor** right inside Minecraft.

### Writing Code

- **Syntax Highlighting** - Keywords, types, variables, methods, strings, and comments are all color-coded automatically. The editor understands your code -- local variables, global fields, and chained method calls each get their own color
- **Autocomplete** - Start typing and get smart suggestions for methods, fields, and classes. Suggestions know whether you're in a static or instance context, and frequently used members appear first
- **Auto Imports** - Type a class name and the editor suggests the correct import for you
- **Error Detection** - Catch mistakes before you even run your script! Wrong argument types, missing methods, type mismatches, unused imports, and more are all underlined with detailed error messages on hover

> Hover over any symbol to see its **full type information**, documentation, and declaration -- just like a desktop IDE.

---

### Navigation

- **Go To Line** - `CTRL+G` jumps to any line instantly
- **Search & Replace** - `CTRL+F` to search, `CTRL+H` to replace. All matches highlight in real-time
- **Go To Definition** - `CTRL+Click` any method, field, or type to jump straight to its definition
- **Fullscreen Mode** - Expand the editor to fill your entire game window for maximum workspace

### Editing

- **Undo/Redo** - Smart undo that works on whole words at a time, not individual characters
- **Line Operations** - Duplicate lines with `CTRL+D`, delete lines, and move lines up or down with shortcuts
- **Comment Toggle** - `CTRL+/` to comment or uncomment selected lines
- **Rename** - Rename a variable or method and every occurrence updates at once
- **Copy Whole Line** - Copy with nothing selected grabs the entire line
- **Triple Click** - Select an entire line instantly

### Visual Polish

- **Line Numbers** - A clean gutter with line numbers and current line highlighting
- **Smooth Scrolling** - Eased scroll animations for a polished feel
- **Indent Guides** - Vertical lines show your code's nesting depth, with the current scope highlighted in green
- **Brace Matching** - Matching `{}` braces light up, and unclosed braces turn red
- **Smart Brackets** - Typing `{` automatically creates the closing `}` with correct indentation. Same for `()`, `[]`, `""`, and `''`
- **Keyboard Shortcut Overlay** - Press a button to see all available shortcuts at a glance

---

## Java Scripting ☕

Write scripts in **real Java** instead of JavaScript! Powered by the **Janino** compiler, your Java code is compiled and runs natively.

- **Full Java Language** - Use classes, interfaces, enums, generics, lambdas, and everything you know from Java
- **Automatic Hook Resolution** - Just name your methods after the hook you want (e.g., `init`, `tick`, `interact`) and they're wired up automatically
- **Language Selector** - Each script tab has a dropdown to choose between JavaScript and Java. Mix and match across tabs
- **External Files** - Write `.java` scripts in an external editor and they're loaded automatically

> Java and JavaScript scripts coexist side by side. Pick whichever language fits your workflow!

---

## Client-Side Scripting 🖥️

Scripts can now run **on the client** for responsive, visual experiences!

- **Server Controlled** - Server owners decide whether client scripting is allowed. Players can't enable it on their own
- **Automatic Sync** - Script files are sent from the server to all connected clients on login, and re-synced whenever scripts are reloaded
- **Safe by Default** - Client scripting is off by default and must be explicitly enabled in the server config

> Client-side scripts open the door to custom UI effects, visual feedback, and client-only hooks -- all while the server stays in full control.

---

## Cloner Tab Overhaul 📂

The Cloner now supports **folders** for organizing your saved NPCs, items, and entries!

- **Folder System** - Create folders and subfolders to keep your cloner organized however you like
- **Full Screen Browser** - A new full-width directory view makes browsing large collections much easier
- **Improved Tabs** - Better tab navigation for switching between cloner categories

---

## Addon API Support 📘

Addon developers can now ship **type definitions** alongside their mods, giving scripters full autocomplete and documentation for addon APIs!

- **Automatic Loading** - Any mod can include API definitions and they'll appear in the script editor automatically
- **Patch Support** - Addons can extend existing CNPC+ types with new methods (e.g., a DBC addon adding `getDBCPlayer()` to the Player type)
- **Full Documentation** - Parameter names, return types, and descriptions all show up in autocomplete and hover info

> If you're a scripter using addons, you get autocomplete for their APIs with zero setup. If you're an addon developer, just include your definitions and everything works.

---

## Animation Improvements 🎬

- **Data Store** - Animations can now store and pass data across events and frames for more complex animation logic
- **Task System** - A new consumer-based system for reacting to animation lifecycle events, replacing the old approach
- **Expanded API** - More animation control exposed to the scripting API

---

## Additional Changes 🔧

- **Player Dialog Events** - Now work the same way as NPC Dialog Events for consistency
- **Linked Item Attack Speed** - Added attack speed configuration to linked items
- **Trader Balance Preview** - Client-side balance prediction shows your expected balance during trades
- **Right-Click Cycling** - Multi-option NPC buttons (Hair, Eyes, Fur, etc.) can now be right-clicked to cycle backwards
- **Quest Cooldown Fix** - Fixed cooldown not working for MC Custom and RL Custom timer types
- **Bard Music Fix** - Fixed music restarting or duplicating when opening dialogs
- **Biome Spawn Fix** - Fixed NPC biome spawn settings not saving after editing
- **Block Waypoint Fix** - Fixed issues with block waypoints
- **Script Config Fix** - Fixed script configuration not syncing properly between server and client

---
18 changes: 16 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
plugins {
id 'com.gtnewhorizons.gtnhconvention'
id 'idea'
id "dts.typescript-generator"
}

version = "1.11-beta5"
Expand Down Expand Up @@ -56,5 +57,18 @@ sourceSets.main.java {
srcDirs += apiDir
}

// Modify the existing 'build' task to depend on 'updateAPI'
//tasks.apiClasses.dependsOn 'updateAPI'
// ============================================================================
// TypeScript Definition Generation Task
// Generates .d.ts files from Java API sources for scripting IDE support
// ============================================================================
// TypeScript plugin is applied above in the main plugins block

tasks.named("generateTypeScriptDefinitions").configure {
sourceDirectories = ['src/api/java']
outputDirectory = "src/main/resources/assets/${project.property("modId")}/api"
apiPackages = ['noppes.npcs.api', 'net.minecraft'] as Set
cleanOutputFirst = true // Clean old generated files before regenerating
}
processResources.dependsOn generateTypeScriptDefinitions
sourcesJar.dependsOn generateTypeScriptDefinitions

2 changes: 2 additions & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ dependencies {

shadowImplementation(project.files("tools/standalone-JaninoLoader-1.0.1-ALPHA.jar"))
annotationProcessor(project.files("tools/standalone-JaninoLoader-1.0.1-ALPHA.jar"))

testImplementation("junit:junit:4.13.2")

if(embedMixin){
// Normal Jar will include built in Mixins
Expand Down
13 changes: 12 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@

pluginManagement {
// resolutionStrategy {
// eachPlugin {
// if(requested.id.toString() == "dts.typescript-generator") {
// useModule("com.github.bigguy345:dts-gradle-plugin:95b8ab4")
// }
// }
// }
//
repositories {
maven { url "https://jitpack.io"}
maven {
// RetroFuturaGradle
name "GTNH Maven"
Expand All @@ -19,3 +27,6 @@ pluginManagement {
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.27'
}

// Include the local gradle-plugins composite build so plugin is resolved locally
includeBuild 'gradle-plugins'
4 changes: 4 additions & 0 deletions src/main/java/noppes/npcs/client/ClientProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@
import noppes.npcs.client.gui.script.GuiScriptGlobal;
import noppes.npcs.client.gui.script.GuiScriptInterface;
import noppes.npcs.client.gui.util.script.PackageFinder;
import noppes.npcs.client.gui.util.script.interpreter.js_parser.JSTypeRegistry;
import noppes.npcs.client.gui.util.script.interpreter.type.ClassIndex;
import noppes.npcs.client.model.ModelNPCGolem;
import noppes.npcs.client.model.ModelNpcCrystal;
import noppes.npcs.client.model.ModelNpcDragon;
Expand Down Expand Up @@ -831,6 +833,8 @@ public boolean isGUIOpen() {
public void buildPackageIndex() {
try {
PackageFinder.init(Thread.currentThread().getContextClassLoader());
ClassIndex.init();
JSTypeRegistry.getInstance().initializeFromResources();
} catch (IOException e) {
}
}
Expand Down
66 changes: 36 additions & 30 deletions src/main/java/noppes/npcs/client/gui/GuiScript.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import noppes.npcs.client.gui.util.GuiNpcLabel;
import noppes.npcs.client.gui.util.GuiNpcTextArea;
import noppes.npcs.client.gui.util.GuiScriptTextArea;
import noppes.npcs.client.gui.util.script.interpreter.ScriptTextContainer;
import noppes.npcs.constants.EnumScriptType;
import noppes.npcs.constants.ScriptContext;
import noppes.npcs.controllers.ScriptContainer;
import noppes.npcs.controllers.ScriptController;
Expand Down Expand Up @@ -88,18 +90,25 @@ public void initGui() {
super.initGui();
this.guiTop += 10;

// ==================== TOP BUTTONS (hidden in fullscreen) ====================
if (!isFullscreen) {
GuiMenuTopButton top;
addTopButton(top = new GuiMenuTopButton(13, guiLeft + 4, guiTop - 17, "script.scripts"));
addTopButton(new GuiMenuTopButton(16, guiLeft + (xSize - 102), guiTop - 17, "eventscript.eventScripts"));
addTopButton(new GuiMenuTopButton(17, guiLeft + (xSize - 22), guiTop - 17, "X"));
top.active = showScript;
addTopButton(top = new GuiMenuTopButton(14, top, "gui.settings"));
top.active = !showScript;
addTopButton(new GuiMenuTopButton(15, top, "gui.website"));
if (isFullscreen) {
FullscreenConfig.paddingTop = 30;
}

// ==================== TOP BUTTONS ====================
boolean isFullscreenView = isFullscreen && showScript;
int menuX = isFullscreenView ? FullscreenConfig.paddingLeft : guiLeft + 4;
int menuY = isFullscreenView ? FullscreenConfig.paddingTop - 20 : guiTop - 17;
int rightX = isFullscreenView ? width - FullscreenConfig.paddingRight : guiLeft + xSize;

GuiMenuTopButton top;
addTopButton(top = new GuiMenuTopButton(13, menuX, menuY, "script.scripts"));
addTopButton(new GuiMenuTopButton(16, rightX - 102, menuY, "eventscript.eventScripts"));
addTopButton(new GuiMenuTopButton(17, rightX - 22, menuY, "X"));
top.active = showScript;
addTopButton(top = new GuiMenuTopButton(14, top, "gui.settings"));
top.active = !showScript;
addTopButton(new GuiMenuTopButton(15, top, "gui.website"));

if (showScript) {
initScriptView();
} else {
Expand Down Expand Up @@ -160,6 +169,10 @@ private void initScriptView() {

activeArea.setLanguage(script.getLanguage());
activeArea.setScriptContext(getScriptContext());

// Set editor globals based on the active NPC hook
String hookName = EnumScriptType.values()[activeTab].function;
applyEditorGlobals(activeArea, hookName);

// Setup fullscreen key binding
GuiScriptTextArea.KEYS.FULLSCREEN.setTask(e -> {
Expand Down Expand Up @@ -225,6 +238,19 @@ private void initSettingsView() {
addButton(new GuiNpcButton(106, guiLeft + 232, guiTop + 71, 150, 20, "script.openfolder"));
}

// Apply editor globals for the active NPC hook.
private void applyEditorGlobals(GuiScriptTextArea activeArea, String hookName) {
if (activeArea == null)
return;

ScriptTextContainer textContainer = activeArea.getContainer();
if (textContainer == null)
return;

if (script != null)
textContainer.setEditorGlobalsMap(script.getEditorGlobals(hookName));
}

@Override
protected String getConsoleText() {
Map<Long, String> map = this.script.getOldConsoleText();
Expand Down Expand Up @@ -351,24 +377,4 @@ public void customScrollClicked(int i, int j, int k, GuiCustomScroll scroll) {
initGui();
}
}

@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
super.drawScreen(mouseX, mouseY, partialTicks);

// Draw fullscreen button when in script view (GuiScript uses 0-based activeTab)
if (showScript) {
fullscreenButton.draw(mouseX, mouseY);
}
}

@Override
public void mouseClicked(int mouseX, int mouseY, int mouseButton) {
// Check fullscreen button first when in script view
if (showScript && fullscreenButton.mouseClicked(mouseX, mouseY, mouseButton)) {
return;
}
super.mouseClicked(mouseX, mouseY, mouseButton);
}
}

Loading
Loading