From ba23b9f6508f2a7e8261e7f48e0825437fc8b48e Mon Sep 17 00:00:00 2001 From: Kam Date: Wed, 4 Feb 2026 18:37:23 -0500 Subject: [PATCH] 1.11 Update Highlighting --- 1.11_Beta_Update.md | 92 ++++++++++++++++++++++++++++++++++ 1.11_Update.md | 118 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 210 insertions(+) create mode 100644 1.11_Beta_Update.md create mode 100644 1.11_Update.md diff --git a/1.11_Beta_Update.md b/1.11_Beta_Update.md new file mode 100644 index 000000000..815c62e5d --- /dev/null +++ b/1.11_Beta_Update.md @@ -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. diff --git a/1.11_Update.md b/1.11_Update.md new file mode 100644 index 000000000..c6101a559 --- /dev/null +++ b/1.11_Update.md @@ -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 + +---