From 59eff1312b48654fcedd482dd6fdc70c86a28ba3 Mon Sep 17 00:00:00 2001 From: Hunter19823 Date: Sat, 29 Nov 2025 18:16:10 -0700 Subject: [PATCH 01/12] Added Bindings page. --- wiki/global-scope/bindings/en.yml | 3 + wiki/global-scope/bindings/page.kubedoc | 213 ++++++++++++++++++++++++ 2 files changed, 216 insertions(+) create mode 100644 wiki/global-scope/bindings/en.yml create mode 100644 wiki/global-scope/bindings/page.kubedoc diff --git a/wiki/global-scope/bindings/en.yml b/wiki/global-scope/bindings/en.yml new file mode 100644 index 00000000..59cf7dab --- /dev/null +++ b/wiki/global-scope/bindings/en.yml @@ -0,0 +1,3 @@ +title: "Bindings" +description: "Global bindings available in KubeJS scripts by version and script type" + diff --git a/wiki/global-scope/bindings/page.kubedoc b/wiki/global-scope/bindings/page.kubedoc new file mode 100644 index 00000000..77134f1d --- /dev/null +++ b/wiki/global-scope/bindings/page.kubedoc @@ -0,0 +1,213 @@ +Bindings are script-type based global constants that connect JavaScript to Java code. They enable your scripts to reference Java objects and classes from JavaScript. + +Each binding is registered for specific script types (startup, server, or client), and some bindings may only exist in certain Minecraft versions or come from specific mods. + +|> 1.21.1 + +| Binding | Startup | Server | Client | Description | Source | +|---------|---------|--------|--------|-------------|--------| +| `global` | ✓ | ✓ | ✓ | Global object map for sharing data between scripts | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L408) | +| `Platform` | ✓ | ✓ | ✓ | Platform information and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L409) | +| `console` | ✓ | ✓ | ✓ | Console object for logging | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L410) | +| `StartupEvents` | ✓ | - | - | Event group for startup scripts | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L412) | +| `ServerEvents` | ✓ | ✓ | - | Event group for server-side events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L412) | +| `LevelEvents` | ✓ | ✓ | - | Event group for level/world events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L412) | +| `NetworkEvents` | ✓ | ✓ | - | Event group for network events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L412) | +| `ItemEvents` | ✓ | ✓ | - | Event group for item-related events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L412) | +| `BlockEvents` | ✓ | ✓ | - | Event group for block-related events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L412) | +| `EntityEvents` | ✓ | ✓ | - | Event group for entity-related events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L412) | +| `PlayerEvents` | ✓ | ✓ | - | Event group for player-related events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L412) | +| `RecipeViewerEvents` | ✓ | ✓ | ✓ | Event group for recipe viewer events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L412) | +| `ClientEvents` | ✓ | - | ✓ | Event group for client-side events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L412) | +| `KeyBindEvents` | ✓ | - | ✓ | Event group for keybind events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L412) | +| `JavaMath` | ✓ | ✓ | ✓ | Java Math class wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L416) | +| `ID` | ✓ | ✓ | ✓ | Resource location and ID utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L417) | +| `Duration` | ✓ | ✓ | ✓ | Duration class for time operations | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L419) | +| `setTimeout` | - | ✓ | ✓ | Schedule a function to run after a delay | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L426) | +| `clearTimeout` | - | ✓ | ✓ | Cancel a scheduled timeout | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L427) | +| `setInterval` | - | ✓ | ✓ | Schedule a function to run repeatedly | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L428) | +| `clearInterval` | - | ✓ | ✓ | Cancel a scheduled interval | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L429) | +| `KMath` | ✓ | ✓ | ✓ | KubeJS math utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L432) | +| `Utils` | ✓ | ✓ | ✓ | General utility functions | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L433) | +| `StringUtils` | ✓ | ✓ | ✓ | String manipulation utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L434) | +| `Java` | ✓ | ✓ | ✓ | Java class loader and reflection utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L435) | +| `Text` | ✓ | ✓ | ✓ | Text component wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L436) | +| `Component` | ✓ | ✓ | ✓ | Alias for Text component wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L437) | +| `TextIcons` | ✓ | ✓ | ✓ | Text icon utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L438) | +| `UUID` | ✓ | ✓ | ✓ | UUID wrapper and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L439) | +| `JsonUtils` | ✓ | ✓ | ✓ | JSON utility functions | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L440) | +| `JsonIO` | ✓ | ✓ | ✓ | JSON file I/O operations | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L441) | +| `Block` | ✓ | ✓ | ✓ | Block wrapper and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L442) | +| `Blocks` | ✓ | ✓ | ✓ | Vanilla blocks registry | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L443) | +| `Item` | ✓ | ✓ | ✓ | Item wrapper and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L444) | +| `Items` | ✓ | ✓ | ✓ | Vanilla items registry | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L445) | +| `Ingredient` | ✓ | ✓ | ✓ | Recipe ingredient wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L446) | +| `NBT` | ✓ | ✓ | ✓ | NBT tag wrapper and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L447) | +| `NBTIO` | ✓ | ✓ | ✓ | NBT file I/O operations | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L448) | +| `Direction` | ✓ | ✓ | ✓ | Direction enum wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L449) | +| `Facing` | ✓ | ✓ | ✓ | Alias for Direction | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L450) | +| `AABB` | ✓ | ✓ | ✓ | Axis-aligned bounding box wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L451) | +| `Stats` | ✓ | ✓ | ✓ | Vanilla stats registry | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L452) | +| `FluidAmounts` | ✓ | ✓ | ✓ | Fluid amount constants and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L453) | +| `Notification` | ✓ | ✓ | ✓ | Notification toast data | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L454) | +| `SizedIngredient` | ✓ | ✓ | ✓ | Sized ingredient wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L455) | +| `ParticleOptions` | ✓ | ✓ | ✓ | Particle options wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L456) | +| `Registry` | ✓ | ✓ | ✓ | Registry wrapper and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L457) | +| `DataMap` | ✓ | ✓ | ✓ | Data map wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L458) | +| `EntitySelector` | ✓ | ✓ | ✓ | Entity selector wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L459) | +| `Fluid` | ✓ | ✓ | ✓ | Fluid wrapper and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L461) | +| `SECOND` | ✓ | ✓ | ✓ | Time constant: 1000 milliseconds | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L463) | +| `MINUTE` | ✓ | ✓ | ✓ | Time constant: 60000 milliseconds | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L464) | +| `HOUR` | ✓ | ✓ | ✓ | Time constant: 3600000 milliseconds | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L465) | +| `Color` | ✓ | ✓ | ✓ | Color wrapper and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L467) | +| `BlockStatePredicate` | ✓ | ✓ | ✓ | Block state predicate wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L468) | +| `Vec3d` | ✓ | ✓ | ✓ | 3D vector (double precision) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L470) | +| `Vec3i` | ✓ | ✓ | ✓ | 3D integer vector | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L471) | +| `Vec3f` | ✓ | ✓ | ✓ | 3D vector (float precision) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L472) | +| `Vec4f` | ✓ | ✓ | ✓ | 4D vector (float precision) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L473) | +| `Matrix3f` | ✓ | ✓ | ✓ | 3x3 matrix (float) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L474) | +| `Matrix4f` | ✓ | ✓ | ✓ | 4x4 matrix (float) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L475) | +| `Quaternionf` | ✓ | ✓ | ✓ | Quaternion (float) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L477) | +| `RotationAxis` | ✓ | ✓ | ✓ | Rotation axis utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L478) | +| `BlockPos` | ✓ | ✓ | ✓ | Block position wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L479) | +| `DamageSource` | ✓ | ✓ | ✓ | Damage source wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L480) | +| `SoundType` | ✓ | ✓ | ✓ | Sound type wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L481) | +| `BlockProperties` | ✓ | ✓ | ✓ | Block state properties registry | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L483) | +| `NativeEvents` | ✓ | ✓ | ✓ | Native event wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L484) | +| `MobEffectUtil` | ✓ | ✓ | ✓ | Mob effect utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L485) | +| `Client` | ✓ | - | ✓ | Minecraft client instance (client-side only) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSClientPlugin.java#L31) | +| `GLFWInput` | ✓ | ✓ | ✓ | GLFW input wrapper for keyboard/mouse | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSClientPlugin.java#L42) | +<||> 1.20.1 + +| Binding | Startup | Server | Client | Description | Source | +|---------|---------|--------|--------|-------------|--------| +| `global` | ✓ | ✓ | ✓ | Global object map for sharing data between scripts | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L341) | +| `Platform` | ✓ | ✓ | ✓ | Platform information and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L342) | +| `console` | ✓ | ✓ | ✓ | Console object for logging | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L343) | +| `StartupEvents` | ✓ | - | - | Event group for startup scripts | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L346) | +| `ServerEvents` | ✓ | ✓ | - | Event group for server-side events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L346) | +| `LevelEvents` | ✓ | ✓ | - | Event group for level/world events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L346) | +| `NetworkEvents` | ✓ | ✓ | - | Event group for network events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L346) | +| `ItemEvents` | ✓ | ✓ | - | Event group for item-related events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L346) | +| `BlockEvents` | ✓ | ✓ | - | Event group for block-related events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L346) | +| `EntityEvents` | ✓ | ✓ | - | Event group for entity-related events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L346) | +| `PlayerEvents` | ✓ | ✓ | - | Event group for player-related events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L346) | +| `RecipeViewerEvents` | ✓ | ✓ | ✓ | Event group for recipe viewer events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L346) | +| `ClientEvents` | ✓ | - | ✓ | Event group for client-side events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L346) | +| `KeyBindEvents` | ✓ | - | ✓ | Event group for keybind events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L346) | +| `JavaMath` | ✓ | ✓ | ✓ | Java Math class wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L349) | +| `ResourceLocation` | ✓ | ✓ | ✓ | Resource location class | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L350) | +| `Duration` | ✓ | ✓ | ✓ | Duration class for time operations | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L351) | +| `setTimeout` | - | ✓ | ✓ | Schedule a function to run after a delay | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L363) | +| `clearTimeout` | - | ✓ | ✓ | Cancel a scheduled timeout | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L364) | +| `setInterval` | - | ✓ | ✓ | Schedule a function to run repeatedly | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L365) | +| `clearInterval` | - | ✓ | ✓ | Cancel a scheduled interval | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L366) | +| `KMath` | ✓ | ✓ | ✓ | KubeJS math utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L369) | +| `Utils` | ✓ | ✓ | ✓ | General utility functions | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L370) | +| `Java` | ✓ | ✓ | ✓ | Java class loader and reflection utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L371) | +| `Text` | ✓ | ✓ | ✓ | Text component wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L372) | +| `Component` | ✓ | ✓ | ✓ | Alias for Text component wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L373) | +| `UUID` | ✓ | ✓ | ✓ | UUID wrapper and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L374) | +| `JsonIO` | ✓ | ✓ | ✓ | JSON file I/O operations | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L375) | +| `Block` | ✓ | ✓ | ✓ | Block wrapper and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L376) | +| `Blocks` | ✓ | ✓ | ✓ | Vanilla blocks registry | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L377) | +| `Item` | ✓ | ✓ | ✓ | Item wrapper and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L378) | +| `Items` | ✓ | ✓ | ✓ | Vanilla items registry | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L379) | +| `Ingredient` | ✓ | ✓ | ✓ | Recipe ingredient wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L380) | +| `IngredientHelper` | ✓ | ✓ | ✓ | Ingredient platform helper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L381) | +| `NBT` | ✓ | ✓ | ✓ | NBT tag wrapper and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L382) | +| `NBTIO` | ✓ | ✓ | ✓ | NBT file I/O operations | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L383) | +| `Direction` | ✓ | ✓ | ✓ | Direction enum wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L384) | +| `Facing` | ✓ | ✓ | ✓ | Alias for Direction | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L385) | +| `AABB` | ✓ | ✓ | ✓ | Axis-aligned bounding box wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L386) | +| `Stats` | ✓ | ✓ | ✓ | Vanilla stats registry | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L387) | +| `FluidAmounts` | ✓ | ✓ | ✓ | Fluid amount constants and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L388) | +| `Notification` | ✓ | ✓ | ✓ | Notification toast data | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L389) | +| `InputItem` | ✓ | ✓ | ✓ | Input item wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L390) | +| `OutputItem` | ✓ | ✓ | ✓ | Output item wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L391) | +| `Fluid` | ✓ | ✓ | ✓ | Fluid wrapper and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L393) | +| `SECOND` | ✓ | ✓ | ✓ | Time constant: 1000 milliseconds | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L395) | +| `MINUTE` | ✓ | ✓ | ✓ | Time constant: 60000 milliseconds | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L396) | +| `HOUR` | ✓ | ✓ | ✓ | Time constant: 3600000 milliseconds | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L397) | +| `Color` | ✓ | ✓ | ✓ | Color wrapper and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L399) | +| `BlockStatePredicate` | ✓ | ✓ | ✓ | Block state predicate wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L400) | +| `Vec3d` | ✓ | ✓ | ✓ | 3D vector (double precision) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L402) | +| `Vec3i` | ✓ | ✓ | ✓ | 3D integer vector | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L403) | +| `Vec3f` | ✓ | ✓ | ✓ | 3D vector (float precision) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L404) | +| `Vec4f` | ✓ | ✓ | ✓ | 4D vector (float precision) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L405) | +| `Matrix3f` | ✓ | ✓ | ✓ | 3x3 matrix (float) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L406) | +| `Matrix4f` | ✓ | ✓ | ✓ | 4x4 matrix (float) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L407) | +| `Quaternionf` | ✓ | ✓ | ✓ | Quaternion (float) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L409) | +| `RotationAxis` | ✓ | ✓ | ✓ | Rotation axis utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L410) | +| `BlockPos` | ✓ | ✓ | ✓ | Block position wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L411) | +| `DamageSource` | ✓ | ✓ | ✓ | Damage source wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L412) | +| `SoundType` | ✓ | ✓ | ✓ | Sound type wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L413) | +| `BlockProperties` | ✓ | ✓ | ✓ | Block state properties registry | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L415) | +| `Client` | ✓ | - | ✓ | Minecraft client instance (client-side only) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/client/BuiltinKubeJSClientPlugin.java#L23) | +| `Painter` | ✓ | - | ✓ | Painter instance (client-side only) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/client/BuiltinKubeJSClientPlugin.java#L24) | +<||> 1.19.2 + +| Binding | Startup | Server | Client | Description | Source | +|---------|---------|--------|--------|-------------|--------| +| `global` | ✓ | ✓ | ✓ | Global object map for sharing data between scripts | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L330) | +| `Platform` | ✓ | ✓ | ✓ | Platform information and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L331) | +| `console` | ✓ | ✓ | ✓ | Console object for logging | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L332) | +| `StartupEvents` | ✓ | - | - | Event group for startup scripts | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L335) | +| `ServerEvents` | ✓ | ✓ | - | Event group for server-side events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L335) | +| `LevelEvents` | ✓ | ✓ | - | Event group for level/world events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L335) | +| `NetworkEvents` | ✓ | ✓ | - | Event group for network events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L335) | +| `ItemEvents` | ✓ | ✓ | - | Event group for item-related events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L335) | +| `BlockEvents` | ✓ | ✓ | - | Event group for block-related events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L335) | +| `EntityEvents` | ✓ | ✓ | - | Event group for entity-related events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L335) | +| `PlayerEvents` | ✓ | ✓ | - | Event group for player-related events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L335) | +| `RecipeViewerEvents` | ✓ | ✓ | ✓ | Event group for recipe viewer events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L335) | +| `ClientEvents` | ✓ | - | ✓ | Event group for client-side events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L335) | +| `KeyBindEvents` | ✓ | - | ✓ | Event group for keybind events | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L335) | +| `JavaMath` | ✓ | ✓ | ✓ | Java Math class wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L338) | +| `ResourceLocation` | ✓ | ✓ | ✓ | Resource location class | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L339) | +| `Duration` | ✓ | ✓ | ✓ | Duration class for time operations | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L340) | +| `KMath` | ✓ | ✓ | ✓ | KubeJS math utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L349) | +| `Utils` | ✓ | ✓ | ✓ | General utility functions | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L350) | +| `Java` | ✓ | ✓ | ✓ | Java class loader and reflection utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L351) | +| `Text` | ✓ | ✓ | ✓ | Text component wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L352) | +| `Component` | ✓ | ✓ | ✓ | Alias for Text component wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L353) | +| `UUID` | ✓ | ✓ | ✓ | UUID wrapper and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L354) | +| `JsonIO` | ✓ | ✓ | ✓ | JSON file I/O operations | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L355) | +| `Block` | ✓ | ✓ | ✓ | Block wrapper and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L356) | +| `Blocks` | ✓ | ✓ | ✓ | Vanilla blocks registry | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L357) | +| `Item` | ✓ | ✓ | ✓ | Item wrapper and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L358) | +| `Items` | ✓ | ✓ | ✓ | Vanilla items registry | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L359) | +| `Ingredient` | ✓ | ✓ | ✓ | Recipe ingredient wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L360) | +| `IngredientHelper` | ✓ | ✓ | ✓ | Ingredient platform helper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L361) | +| `NBT` | ✓ | ✓ | ✓ | NBT tag wrapper and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L362) | +| `NBTIO` | ✓ | ✓ | ✓ | NBT file I/O operations | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L363) | +| `Direction` | ✓ | ✓ | ✓ | Direction enum wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L364) | +| `Facing` | ✓ | ✓ | ✓ | Alias for Direction | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L365) | +| `AABB` | ✓ | ✓ | ✓ | Axis-aligned bounding box wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L366) | +| `Stats` | ✓ | ✓ | ✓ | Vanilla stats registry | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L367) | +| `FluidAmounts` | ✓ | ✓ | ✓ | Fluid amount constants and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L368) | +| `Notification` | ✓ | ✓ | ✓ | Notification toast data | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L369) | +| `InputItem` | ✓ | ✓ | ✓ | Input item wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L370) | +| `OutputItem` | ✓ | ✓ | ✓ | Output item wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L371) | +| `Fluid` | ✓ | ✓ | ✓ | Fluid wrapper and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L373) | +| `SECOND` | ✓ | ✓ | ✓ | Time constant: 1000 milliseconds | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L375) | +| `MINUTE` | ✓ | ✓ | ✓ | Time constant: 60000 milliseconds | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L376) | +| `HOUR` | ✓ | ✓ | ✓ | Time constant: 3600000 milliseconds | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L377) | +| `Color` | ✓ | ✓ | ✓ | Color wrapper and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L379) | +| `BlockStatePredicate` | ✓ | ✓ | ✓ | Block state predicate wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L380) | +| `Vec3` | ✓ | ✓ | ✓ | 3D vector (double precision) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L382) | +| `Vec3d` | ✓ | ✓ | ✓ | Alias for Vec3 | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L383) | +| `Vec3i` | ✓ | ✓ | ✓ | 3D integer vector | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L384) | +| `Vec3f` | ✓ | ✓ | ✓ | 3D vector (float precision) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L385) | +| `Vec4f` | ✓ | ✓ | ✓ | 4D vector (float precision) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L386) | +| `Matrix3f` | ✓ | ✓ | ✓ | 3x3 matrix (float) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L387) | +| `Matrix4f` | ✓ | ✓ | ✓ | 4x4 matrix (float) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L388) | +| `Quaternionf` | ✓ | ✓ | ✓ | Quaternion (float) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L389) | +| `RotationAxis` | ✓ | ✓ | ✓ | Rotation axis utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L390) | +| `BlockPos` | ✓ | ✓ | ✓ | Block position wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L391) | +| `DamageSource` | ✓ | ✓ | ✓ | Damage source wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L392) | +| `SoundType` | ✓ | ✓ | ✓ | Sound type wrapper | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L393) | +| `BlockProperties` | ✓ | ✓ | ✓ | Block state properties registry | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L395) | +| `Client` | ✓ | - | ✓ | Minecraft client instance (client-side only) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/client/BuiltinKubeJSClientPlugin.java#L22) | +| `Painter` | ✓ | - | ✓ | Painter instance (client-side only) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/client/BuiltinKubeJSClientPlugin.java#L23) | + From d01d67efd88ad34ca2e8e47ec901f82c5fa6e494 Mon Sep 17 00:00:00 2001 From: Hunter19823 Date: Sat, 29 Nov 2025 18:29:36 -0700 Subject: [PATCH 02/12] Added a page for Platform binding --- wiki/global-scope/bindings/Platform/en.yml | 3 + .../bindings/Platform/page.kubedoc | 134 ++++++++++++++++++ 2 files changed, 137 insertions(+) create mode 100644 wiki/global-scope/bindings/Platform/en.yml create mode 100644 wiki/global-scope/bindings/Platform/page.kubedoc diff --git a/wiki/global-scope/bindings/Platform/en.yml b/wiki/global-scope/bindings/Platform/en.yml new file mode 100644 index 00000000..a563bfde --- /dev/null +++ b/wiki/global-scope/bindings/Platform/en.yml @@ -0,0 +1,3 @@ +title: "Platform" +description: "Platform information and utilities for accessing mod and Minecraft version information" + diff --git a/wiki/global-scope/bindings/Platform/page.kubedoc b/wiki/global-scope/bindings/Platform/page.kubedoc new file mode 100644 index 00000000..cc83bfb6 --- /dev/null +++ b/wiki/global-scope/bindings/Platform/page.kubedoc @@ -0,0 +1,134 @@ +# Platform + +**Java Class:** `dev.latvian.mods.kubejs.script.PlatformWrapper` - [View on GitHub](https://github.com/KubeJS-Mods/KubeJS) + +Platform information and utilities for accessing mod and Minecraft version information. + +|> 1.21.1 + +**Source:** [PlatformWrapper.java](https://github.com/KubeJS-Mods/KubeJS/blob/main/src/main/java/dev/latvian/mods/kubejs/script/PlatformWrapper.java) + +## Script Types + +- Startup: ✓ +- Server: ✓ +- Client: ✓ + +## Members + +### Static Methods + +- `getMcVersion()`: string - Returns the Minecraft version string +- `getModVersion()`: string - Returns the KubeJS mod version +- `getMinecraftVersion()`: number - Returns the Minecraft version number +- `getMinecraftVersionString()`: string - Returns the Minecraft version string +- `getList()`: Set - Returns a set of all loaded mod IDs +- `isLoaded(modId: string)`: boolean - Checks if a mod with the given ID is loaded +- `getInfo(modId: string)`: ModInfo - Gets information about a mod +- `getMods()`: Map - Returns a map of all loaded mods +- `isDevelopmentEnvironment()`: boolean - Checks if running in development environment +- `isClientEnvironment()`: boolean - Checks if running in client environment +- `setModName(modId: string, name: string)`: void - Sets the display name of a mod +- `isGeneratingData()`: boolean - Checks if data generation is running +- `breakpoint(...args)`: void - Debug breakpoint function +- `getCurrentThreadName()`: string - Returns the current thread name +- `getPackMode()`: string - Returns the current pack mode + +### ModInfo Class + +- `getId()`: string - Returns the mod ID +- `getName()`: string - Returns the mod name +- `getVersion()`: string - Returns the mod version +- `getCustomName()`: string - Returns the custom name +- `setName(name: string)`: void - Sets the mod name + +## Examples + +WIP + +<||> 1.20.1 + +**Source:** [PlatformWrapper.java](https://github.com/KubeJS-Mods/KubeJS/blob/2001/common/src/main/java/dev/latvian/mods/kubejs/script/PlatformWrapper.java) + +## Script Types + +- Startup: ✓ +- Server: ✓ +- Client: ✓ + +## Members + +### Static Methods + +- `getMcVersion()`: string - Returns the Minecraft version string +- `getModVersion()`: string - Returns the KubeJS mod version +- `getMinecraftVersion()`: number - Returns the Minecraft version number +- `getMinecraftVersionString()`: string - Returns the Minecraft version string +- `getList()`: Set - Returns a set of all loaded mod IDs +- `isLoaded(modId: string)`: boolean - Checks if a mod with the given ID is loaded +- `getInfo(modId: string)`: ModInfo - Gets information about a mod +- `getMods()`: Map - Returns a map of all loaded mods +- `isDevelopmentEnvironment()`: boolean - Checks if running in development environment +- `isClientEnvironment()`: boolean - Checks if running in client environment +- `setModName(modId: string, name: string)`: void - Sets the display name of a mod +- `isGeneratingData()`: boolean - Checks if data generation is running +- `breakpoint(...args)`: void - Debug breakpoint function +- `getCurrentThreadName()`: string - Returns the current thread name +- `getPackMode()`: string - Returns the current pack mode + +### ModInfo Class + +- `getId()`: string - Returns the mod ID +- `getName()`: string - Returns the mod name +- `getVersion()`: string - Returns the mod version +- `getCustomName()`: string - Returns the custom name +- `setName(name: string)`: void - Sets the mod name + +## Examples + +WIP + +<||> 1.19.2 + +**Source:** [PlatformWrapper.java](https://github.com/KubeJS-Mods/KubeJS/blob/1902/common/src/main/java/dev/latvian/mods/kubejs/script/PlatformWrapper.java) + +## Script Types + +- Startup: ✓ +- Server: ✓ +- Client: ✓ + +## Members + +### Static Methods + +- `getMcVersion()`: string - Returns the Minecraft version string +- `getModVersion()`: string - Returns the KubeJS mod version +- `getMinecraftVersion()`: number - Returns the Minecraft version number +- `getMinecraftVersionString()`: string - Returns the Minecraft version string +- `getList()`: Set - Returns a set of all loaded mod IDs +- `isLoaded(modId: string)`: boolean - Checks if a mod with the given ID is loaded +- `getInfo(modId: string)`: ModInfo - Gets information about a mod +- `getMods()`: Map - Returns a map of all loaded mods +- `isDevelopmentEnvironment()`: boolean - Checks if running in development environment +- `isClientEnvironment()`: boolean - Checks if running in client environment +- `setModName(modId: string, name: string)`: void - Sets the display name of a mod +- `isGeneratingData()`: boolean - Checks if data generation is running +- `breakpoint(...args)`: void - Debug breakpoint function +- `getCurrentThreadName()`: string - Returns the current thread name +- `getPackMode()`: string - Returns the current pack mode + +### ModInfo Class + +- `getId()`: string - Returns the mod ID +- `getName()`: string - Returns the mod name +- `getVersion()`: string - Returns the mod version +- `getCustomName()`: string - Returns the custom name +- `setName(name: string)`: void - Sets the mod name + +## Examples + +WIP + +<| + From 03db05959d2f6dab7d67bd46c40d51b1524b7107 Mon Sep 17 00:00:00 2001 From: Hunter19823 Date: Sat, 29 Nov 2025 18:31:39 -0700 Subject: [PATCH 03/12] Added global binding page --- wiki/global-scope/bindings/global/en.yml | 3 + .../global-scope/bindings/global/page.kubedoc | 62 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 wiki/global-scope/bindings/global/en.yml create mode 100644 wiki/global-scope/bindings/global/page.kubedoc diff --git a/wiki/global-scope/bindings/global/en.yml b/wiki/global-scope/bindings/global/en.yml new file mode 100644 index 00000000..a9546a8c --- /dev/null +++ b/wiki/global-scope/bindings/global/en.yml @@ -0,0 +1,3 @@ +title: "global" +description: "Global object map for sharing data between scripts" + diff --git a/wiki/global-scope/bindings/global/page.kubedoc b/wiki/global-scope/bindings/global/page.kubedoc new file mode 100644 index 00000000..6524b2a4 --- /dev/null +++ b/wiki/global-scope/bindings/global/page.kubedoc @@ -0,0 +1,62 @@ +# global + +**Java Class:** `Map` - [View Java Documentation](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Map.html) + +Global object map for sharing data between scripts. You can use this to set objects and callbacks in startup script and reference them from server or client scripts. + +|> 1.21.1 + +**Note:** This is a standard Java `Map` object. It's registered as a binding in [BuiltinKubeJSPlugin.java](https://github.com/KubeJS-Mods/KubeJS/blob/main/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java). + +## Script Types + +- Startup: ✓ +- Server: ✓ +- Client: ✓ + +## Members + +This is a standard JavaScript Map/object. You can set and get properties on it directly. + +## Examples + +WIP + +<||> 1.20.1 + +**Note:** This is a standard Java `Map` object. It's registered as a binding in [BuiltinKubeJSPlugin.java](https://github.com/KubeJS-Mods/KubeJS/blob/2001/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java). + +## Script Types + +- Startup: ✓ +- Server: ✓ +- Client: ✓ + +## Members + +This is a standard JavaScript Map/object. You can set and get properties on it directly. + +## Examples + +WIP + +<||> 1.19.2 + +**Note:** This is a standard Java `Map` object. It's registered as a binding in [BuiltinKubeJSPlugin.java](https://github.com/KubeJS-Mods/KubeJS/blob/1902/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java). + +## Script Types + +- Startup: ✓ +- Server: ✓ +- Client: ✓ + +## Members + +This is a standard JavaScript Map/object. You can set and get properties on it directly. + +## Examples + +WIP + +<| + From 8cfb19d24a5e3b2ef194e19d9dd8514c88c9a684 Mon Sep 17 00:00:00 2001 From: Hunter19823 Date: Sat, 29 Nov 2025 18:36:23 -0700 Subject: [PATCH 04/12] Added Console binding page. --- wiki/global-scope/bindings/console/en.yml | 3 + .../bindings/console/page.kubedoc | 142 ++++++++++++++++++ 2 files changed, 145 insertions(+) create mode 100644 wiki/global-scope/bindings/console/en.yml create mode 100644 wiki/global-scope/bindings/console/page.kubedoc diff --git a/wiki/global-scope/bindings/console/en.yml b/wiki/global-scope/bindings/console/en.yml new file mode 100644 index 00000000..527dfe9d --- /dev/null +++ b/wiki/global-scope/bindings/console/en.yml @@ -0,0 +1,3 @@ +title: "console" +description: "Console object for logging" + diff --git a/wiki/global-scope/bindings/console/page.kubedoc b/wiki/global-scope/bindings/console/page.kubedoc new file mode 100644 index 00000000..83d725a2 --- /dev/null +++ b/wiki/global-scope/bindings/console/page.kubedoc @@ -0,0 +1,142 @@ +# console + +**Java Class:** `dev.latvian.mods.kubejs.script.ConsoleJS` - [View on GitHub](https://github.com/KubeJS-Mods/KubeJS) + +The `console` binding provides a logging interface for outputting messages to the game's console and log files. This is essential for debugging your scripts and understanding what your code is doing. + +All console messages are written to the KubeJS log files, and errors/warnings are also displayed in-game when they occur. + +|> 1.21.1 + +**Source:** [ConsoleJS.java](https://github.com/KubeJS-Mods/KubeJS/blob/main/src/main/java/dev/latvian/mods/kubejs/script/ConsoleJS.java) + +## Script Types + +- Startup: ✓ +- Server: ✓ +- Client: ✓ + +## Members + +### Basic Logging Methods + +- `console.log(...message: Object[])`: void - Logs one or more messages as info-level messages. This is the most common method for general output. +- `console.info(message: Object)`: ConsoleLine - Logs a single message at info level. Returns a ConsoleLine object. +- `console.infof(message: string, ...args: Object[])`: ConsoleLine - Logs a formatted message at info level. Uses string formatting (like `"Hello %s"` with `args`). + +### Warning Methods + +- `console.warn(message: Object)`: ConsoleLine - Logs a warning message. Warnings indicate something that might be wrong but doesn't prevent the script from running. +- `console.warnf(message: string, ...args: Object[])`: ConsoleLine - Logs a formatted warning message. +- `console.warn(message: string, error: Throwable)`: ConsoleLine - Logs a warning with an associated error/exception. + +### Error Methods + +- `console.error(message: Object)`: ConsoleLine - Logs an error message. Errors indicate problems that may prevent functionality from working correctly. +- `console.errorf(message: string, ...args: Object[])`: ConsoleLine - Logs a formatted error message. +- `console.error(message: string, error: Throwable)`: ConsoleLine - Logs an error with an associated error/exception. + +### Debug Methods + +- `console.debug(message: Object)`: ConsoleLine | null - Logs a debug message. Debug messages are only shown when debug mode is enabled. +- `console.debugf(message: string, ...args: Object[])`: ConsoleLine | null - Logs a formatted debug message. + +### Properties + +- `console.errors`: Collection - A collection of all error messages logged to this console. +- `console.warnings`: Collection - A collection of all warning messages logged to this console. + +## Examples + +WIP + +<||> 1.20.1 + +**Source:** [ConsoleJS.java](https://github.com/KubeJS-Mods/KubeJS/blob/2001/common/src/main/java/dev/latvian/mods/kubejs/util/ConsoleJS.java) + +## Script Types + +- Startup: ✓ +- Server: ✓ +- Client: ✓ + +## Members + +### Basic Logging Methods + +- `console.log(...message: Object[])`: void - Logs one or more messages as info-level messages +- `console.info(message: Object)`: ConsoleLine - Logs a single message at info level +- `console.infof(message: string, ...args: Object[])`: ConsoleLine - Logs a formatted message at info level + +### Warning Methods + +- `console.warn(message: Object)`: ConsoleLine - Logs a warning message +- `console.warnf(message: string, ...args: Object[])`: ConsoleLine - Logs a formatted warning message +- `console.warn(message: string, error: Throwable)`: ConsoleLine - Logs a warning with an associated error + +### Error Methods + +- `console.error(message: Object)`: ConsoleLine - Logs an error message +- `console.errorf(message: string, ...args: Object[])`: ConsoleLine - Logs a formatted error message +- `console.error(message: string, error: Throwable)`: ConsoleLine - Logs an error with an associated error + +### Debug Methods + +- `console.debug(message: Object)`: ConsoleLine | null - Logs a debug message (only shown when debug mode is enabled) +- `console.debugf(message: string, ...args: Object[])`: ConsoleLine | null - Logs a formatted debug message + +### Properties + +- `console.errors`: Collection - A collection of all error messages logged to this console +- `console.warnings`: Collection - A collection of all warning messages logged to this console + +## Examples + +WIP + +<||> 1.19.2 + +**Source:** [ConsoleJS.java](https://github.com/KubeJS-Mods/KubeJS/blob/1902/common/src/main/java/dev/latvian/mods/kubejs/util/ConsoleJS.java) + +## Script Types + +- Startup: ✓ +- Server: ✓ +- Client: ✓ + +## Members + +### Basic Logging Methods + +- `console.log(...message: Object[])`: void - Logs one or more messages as info-level messages +- `console.info(message: Object)`: ConsoleLine - Logs a single message at info level +- `console.infof(message: string, ...args: Object[])`: ConsoleLine - Logs a formatted message at info level + +### Warning Methods + +- `console.warn(message: Object)`: ConsoleLine - Logs a warning message +- `console.warnf(message: string, ...args: Object[])`: ConsoleLine - Logs a formatted warning message +- `console.warn(message: string, error: Throwable)`: ConsoleLine - Logs a warning with an associated error + +### Error Methods + +- `console.error(message: Object)`: ConsoleLine - Logs an error message +- `console.errorf(message: string, ...args: Object[])`: ConsoleLine - Logs a formatted error message +- `console.error(message: string, error: Throwable)`: ConsoleLine - Logs an error with an associated error + +### Debug Methods + +- `console.debug(message: Object)`: ConsoleLine | null - Logs a debug message (only shown when debug mode is enabled) +- `console.debugf(message: string, ...args: Object[])`: ConsoleLine | null - Logs a formatted debug message + +### Properties + +- `console.errors`: Collection - A collection of all error messages logged to this console +- `console.warnings`: Collection - A collection of all warning messages logged to this console + +## Examples + +WIP + +<| + From aa0f59e9fe691ec4851dab940dd3bafd27ced764 Mon Sep 17 00:00:00 2001 From: Hunter19823 Date: Sat, 29 Nov 2025 18:41:01 -0700 Subject: [PATCH 05/12] Added Java binding page. --- wiki/global-scope/bindings/Java/en.yml | 3 + wiki/global-scope/bindings/Java/page.kubedoc | 77 ++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 wiki/global-scope/bindings/Java/en.yml create mode 100644 wiki/global-scope/bindings/Java/page.kubedoc diff --git a/wiki/global-scope/bindings/Java/en.yml b/wiki/global-scope/bindings/Java/en.yml new file mode 100644 index 00000000..f3d85ba5 --- /dev/null +++ b/wiki/global-scope/bindings/Java/en.yml @@ -0,0 +1,3 @@ +title: "Java" +description: "Methods for working with Java classes. Reflection utilities for loading and working with Java classes from JavaScript." + diff --git a/wiki/global-scope/bindings/Java/page.kubedoc b/wiki/global-scope/bindings/Java/page.kubedoc new file mode 100644 index 00000000..9570edea --- /dev/null +++ b/wiki/global-scope/bindings/Java/page.kubedoc @@ -0,0 +1,77 @@ +# Java + +**Java Class:** `dev.latvian.mods.kubejs.plugin.builtin.wrapper.JavaWrapper` - [View on GitHub](https://github.com/KubeJS-Mods/KubeJS) + +Methods for working with Java classes. Reflection utilities for loading and working with Java classes from JavaScript. + +|> 1.21.1 + +**Source:** [JavaWrapper.java](https://github.com/KubeJS-Mods/KubeJS/blob/main/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/wrapper/JavaWrapper.java) + +## Script Types + +- Startup: ✓ +- Server: ✓ +- Client: ✓ + +## Members + +### Static Methods + +- `loadClass(className: string)`: Object - Loads the specified class, and throws error if class is not found or allowed. The returned object can have public static methods and fields accessed directly from it. Constructors can be used with the new keyword. +- `tryLoadClass(className: string)`: Object | null - Loads the specified class, and returns null if class is not found or allowed. The returned object can have public static methods and fields accessed directly from it. Constructors can be used with the new keyword. +- `createConsole(name: string)`: ConsoleJS - Creates a custom ConsoleJS instance for logging +- `cast(targetClass: Class, object: Object)`: T - Cast the object to a target type, use if Rhino can't determine the parameter type due to type erasure. + +## Examples + +WIP + +<||> 1.20.1 + +**Source:** [JavaWrapper.java](https://github.com/KubeJS-Mods/KubeJS/blob/2001/common/src/main/java/dev/latvian/mods/kubejs/bindings/JavaWrapper.java) + +## Script Types + +- Startup: ✓ +- Server: ✓ +- Client: ✓ + +## Members + +### Static Methods + +- `loadClass(className: string)`: Object - Loads the specified class, and throws error if class is not found or allowed. The returned object can have public static methods and fields accessed directly from it. Constructors can be used with the new keyword. +- `tryLoadClass(className: string)`: Object | null - Loads the specified class, and returns null if class is not found or allowed. The returned object can have public static methods and fields accessed directly from it. Constructors can be used with the new keyword. +- `createConsole(name: string)`: ConsoleJS - Creates a custom ConsoleJS instance for logging +- `cast(targetClass: Class, object: Object)`: T - Cast the object to a target type, use if Rhino can't determine the parameter type due to type erasure. + +## Examples + +WIP + +<||> 1.19.2 + +**Source:** [JavaWrapper.java](https://github.com/KubeJS-Mods/KubeJS/blob/1902/common/src/main/java/dev/latvian/mods/kubejs/bindings/JavaWrapper.java) + +## Script Types + +- Startup: ✓ +- Server: ✓ +- Client: ✓ + +## Members + +### Static Methods + +- `loadClass(className: string)`: Object - Loads the specified class, and throws error if class is not found or allowed. The returned object can have public static methods and fields accessed directly from it. Constructors can be used with the new keyword. +- `tryLoadClass(className: string)`: Object | null - Loads the specified class, and returns null if class is not found or allowed. The returned object can have public static methods and fields accessed directly from it. Constructors can be used with the new keyword. +- `createConsole(name: string)`: ConsoleJS - Creates a custom ConsoleJS instance for logging +- `cast(targetClass: Class, object: Object)`: T - Cast the object to a target type, use if Rhino can't determine the parameter type due to type erasure. + +## Examples + +WIP + +<| + From aceefd8c789804c64379458b0bad33f7df3151d8 Mon Sep 17 00:00:00 2001 From: Hunter19823 Date: Sat, 29 Nov 2025 18:41:37 -0700 Subject: [PATCH 06/12] Added Text binding page. --- wiki/global-scope/bindings/Text/en.yml | 3 + wiki/global-scope/bindings/Text/page.kubedoc | 86 ++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 wiki/global-scope/bindings/Text/en.yml create mode 100644 wiki/global-scope/bindings/Text/page.kubedoc diff --git a/wiki/global-scope/bindings/Text/en.yml b/wiki/global-scope/bindings/Text/en.yml new file mode 100644 index 00000000..c67a2540 --- /dev/null +++ b/wiki/global-scope/bindings/Text/en.yml @@ -0,0 +1,3 @@ +title: "Text" +description: "The hub for all things text components. Format text to your hearts content!" + diff --git a/wiki/global-scope/bindings/Text/page.kubedoc b/wiki/global-scope/bindings/Text/page.kubedoc new file mode 100644 index 00000000..ebfb5bca --- /dev/null +++ b/wiki/global-scope/bindings/Text/page.kubedoc @@ -0,0 +1,86 @@ +# Text + +**Java Class:** `dev.latvian.mods.kubejs.plugin.builtin.wrapper.TextWrapper` - [View on GitHub](https://github.com/KubeJS-Mods/KubeJS) + +The hub for all things text components. Format text to your hearts content! + +|> 1.21.1 + +**Source:** [TextWrapper.java](https://github.com/KubeJS-Mods/KubeJS/blob/main/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/wrapper/TextWrapper.java) + +## Script Types + +- Startup: ✓ +- Server: ✓ +- Client: ✓ + +## Members + +### Static Methods + +- `of(component: MutableComponent)`: MutableComponent - Returns a Component of the input +- `ofString(text: string)`: MutableComponent - Creates a literal text component +- `translatable(key: string, ...args)`: MutableComponent - Creates a translatable text component +- `keybind(key: string)`: MutableComponent - Creates a keybind text component +- `score(name: string, objective: string)`: MutableComponent - Creates a score text component +- `selector(selector: string)`: MutableComponent - Creates a selector text component +- `lore(lore: List)`: ItemLore - Creates an ItemLore from a list of components + +## Examples + +WIP + +<||> 1.20.1 + +**Source:** [TextWrapper.java](https://github.com/KubeJS-Mods/KubeJS/blob/2001/common/src/main/java/dev/latvian/mods/kubejs/bindings/TextWrapper.java) + +## Script Types + +- Startup: ✓ +- Server: ✓ +- Client: ✓ + +## Members + +### Static Methods + +- `of(component: MutableComponent)`: MutableComponent - Returns a Component of the input +- `ofString(text: string)`: MutableComponent - Creates a literal text component +- `translatable(key: string, ...args)`: MutableComponent - Creates a translatable text component +- `keybind(key: string)`: MutableComponent - Creates a keybind text component +- `score(name: string, objective: string)`: MutableComponent - Creates a score text component +- `selector(selector: string)`: MutableComponent - Creates a selector text component +- `lore(lore: List)`: ItemLore - Creates an ItemLore from a list of components + +## Examples + +WIP + +<||> 1.19.2 + +**Source:** [TextWrapper.java](https://github.com/KubeJS-Mods/KubeJS/blob/1902/common/src/main/java/dev/latvian/mods/kubejs/bindings/TextWrapper.java) + +## Script Types + +- Startup: ✓ +- Server: ✓ +- Client: ✓ + +## Members + +### Static Methods + +- `of(component: MutableComponent)`: MutableComponent - Returns a Component of the input +- `ofString(text: string)`: MutableComponent - Creates a literal text component +- `translatable(key: string, ...args)`: MutableComponent - Creates a translatable text component +- `keybind(key: string)`: MutableComponent - Creates a keybind text component +- `score(name: string, objective: string)`: MutableComponent - Creates a score text component +- `selector(selector: string)`: MutableComponent - Creates a selector text component +- `lore(lore: List)`: ItemLore - Creates an ItemLore from a list of components + +## Examples + +WIP + +<| + From e21af4d11067f7cab4b326e4a767a094073323ef Mon Sep 17 00:00:00 2001 From: Hunter19823 Date: Sat, 29 Nov 2025 18:42:22 -0700 Subject: [PATCH 07/12] Added Utils page. --- wiki/global-scope/bindings/Utils/en.yml | 3 + wiki/global-scope/bindings/Utils/page.kubedoc | 122 ++++++++++++++++++ 2 files changed, 125 insertions(+) create mode 100644 wiki/global-scope/bindings/Utils/en.yml create mode 100644 wiki/global-scope/bindings/Utils/page.kubedoc diff --git a/wiki/global-scope/bindings/Utils/en.yml b/wiki/global-scope/bindings/Utils/en.yml new file mode 100644 index 00000000..902d4916 --- /dev/null +++ b/wiki/global-scope/bindings/Utils/en.yml @@ -0,0 +1,3 @@ +title: "Utils" +description: "A collection of utilities for common operations" + diff --git a/wiki/global-scope/bindings/Utils/page.kubedoc b/wiki/global-scope/bindings/Utils/page.kubedoc new file mode 100644 index 00000000..1bb93ba6 --- /dev/null +++ b/wiki/global-scope/bindings/Utils/page.kubedoc @@ -0,0 +1,122 @@ +# Utils + +**Java Class:** `dev.latvian.mods.kubejs.plugin.builtin.wrapper.UtilsWrapper` - [View on GitHub](https://github.com/KubeJS-Mods/KubeJS) + +A collection of utilities for common operations. + +|> 1.21.1 + +**Source:** [UtilsWrapper.java](https://github.com/KubeJS-Mods/KubeJS/blob/main/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/wrapper/UtilsWrapper.java) + +## Script Types + +- Startup: ✓ +- Server: ✓ +- Client: ✓ + +## Members + +### Static Methods + +- `getRandom()`: RandomSource - Get a Random, for generating random numbers. Note this will always return the same Random instance +- `newRandom(seed: number)`: RandomSource - Get a new random with the specified seed +- `emptyList()`: List - Get an immutable empty list +- `emptyMap()`: Map - Get an immutable empty map +- `newList()`: List - Returns a new mutable list +- `newMap()`: Map - Returns a new mutable map +- `newCountingMap()`: CountingMap - Returns a new counting map +- `regex(pattern: string)`: Pattern - Returns a regex pattern of the input +- `regex(pattern: string, flags: number)`: Pattern - Returns a regex pattern of the input with the specified flags +- `getStat(id: ResourceLocation)`: Stat - Returns a Stat of the passed in ResourceLocation +- `getSound(id: ResourceLocation)`: SoundEvent | null - Gets a SoundEvent from the id +- `randomOf(random: Random, objects: Collection)`: Object - Gets a random object from the list using the passed in random +- `getSystemTime()`: number - Gets the current system time, in milliseconds +- `isWrapped(o: Object)`: boolean - Checks if the passed in object is an instance of WrappedJS +- `lazy(supplier: Supplier)`: Lazy - Returns a lazy value with the supplier function as its value factory +- `expiringLazy(supplier: Supplier, expires: Duration)`: Lazy - Returns a lazy value with the supplier function as its value factory, that will expire after the specified time +- `findCreativeTab(id: ResourceLocation)`: CreativeModeTab | null - Returns the creative tab associated with the id +- `runAsync(task: Runnable)`: CompletableFuture - Runs the provided runnable function in KubeJS' background thread and returns its CompletableFuture +- `supplyAsync(task: Supplier)`: CompletableFuture - Runs the provided supplier function in KubeJS' background thread and returns its CompletableFuture + +## Examples + +WIP + +<||> 1.20.1 + +**Source:** [UtilsWrapper.java](https://github.com/KubeJS-Mods/KubeJS/blob/2001/common/src/main/java/dev/latvian/mods/kubejs/bindings/UtilsWrapper.java) + +## Script Types + +- Startup: ✓ +- Server: ✓ +- Client: ✓ + +## Members + +### Static Methods + +- `getRandom()`: RandomSource - Get a Random, for generating random numbers. Note this will always return the same Random instance +- `newRandom(seed: number)`: RandomSource - Get a new random with the specified seed +- `emptyList()`: List - Get an immutable empty list +- `emptyMap()`: Map - Get an immutable empty map +- `newList()`: List - Returns a new mutable list +- `newMap()`: Map - Returns a new mutable map +- `newCountingMap()`: CountingMap - Returns a new counting map +- `regex(pattern: string)`: Pattern - Returns a regex pattern of the input +- `regex(pattern: string, flags: number)`: Pattern - Returns a regex pattern of the input with the specified flags +- `getStat(id: ResourceLocation)`: Stat - Returns a Stat of the passed in ResourceLocation +- `getSound(id: ResourceLocation)`: SoundEvent | null - Gets a SoundEvent from the id +- `randomOf(random: Random, objects: Collection)`: Object - Gets a random object from the list using the passed in random +- `getSystemTime()`: number - Gets the current system time, in milliseconds +- `isWrapped(o: Object)`: boolean - Checks if the passed in object is an instance of WrappedJS +- `lazy(supplier: Supplier)`: Lazy - Returns a lazy value with the supplier function as its value factory +- `expiringLazy(supplier: Supplier, expires: Duration)`: Lazy - Returns a lazy value with the supplier function as its value factory, that will expire after the specified time +- `findCreativeTab(id: ResourceLocation)`: CreativeModeTab | null - Returns the creative tab associated with the id +- `runAsync(task: Runnable)`: CompletableFuture - Runs the provided runnable function in KubeJS' background thread and returns its CompletableFuture +- `supplyAsync(task: Supplier)`: CompletableFuture - Runs the provided supplier function in KubeJS' background thread and returns its CompletableFuture + +## Examples + +WIP + +<||> 1.19.2 + +**Source:** [UtilsWrapper.java](https://github.com/KubeJS-Mods/KubeJS/blob/1902/common/src/main/java/dev/latvian/mods/kubejs/bindings/UtilsWrapper.java) + +## Script Types + +- Startup: ✓ +- Server: ✓ +- Client: ✓ + +## Members + +### Static Methods + +- `getRandom()`: RandomSource - Get a Random, for generating random numbers. Note this will always return the same Random instance +- `newRandom(seed: number)`: RandomSource - Get a new random with the specified seed +- `emptyList()`: List - Get an immutable empty list +- `emptyMap()`: Map - Get an immutable empty map +- `newList()`: List - Returns a new mutable list +- `newMap()`: Map - Returns a new mutable map +- `newCountingMap()`: CountingMap - Returns a new counting map +- `regex(pattern: string)`: Pattern - Returns a regex pattern of the input +- `regex(pattern: string, flags: number)`: Pattern - Returns a regex pattern of the input with the specified flags +- `getStat(id: ResourceLocation)`: Stat - Returns a Stat of the passed in ResourceLocation +- `getSound(id: ResourceLocation)`: SoundEvent | null - Gets a SoundEvent from the id +- `randomOf(random: Random, objects: Collection)`: Object - Gets a random object from the list using the passed in random +- `getSystemTime()`: number - Gets the current system time, in milliseconds +- `isWrapped(o: Object)`: boolean - Checks if the passed in object is an instance of WrappedJS +- `lazy(supplier: Supplier)`: Lazy - Returns a lazy value with the supplier function as its value factory +- `expiringLazy(supplier: Supplier, expires: Duration)`: Lazy - Returns a lazy value with the supplier function as its value factory, that will expire after the specified time +- `findCreativeTab(id: ResourceLocation)`: CreativeModeTab | null - Returns the creative tab associated with the id +- `runAsync(task: Runnable)`: CompletableFuture - Runs the provided runnable function in KubeJS' background thread and returns its CompletableFuture +- `supplyAsync(task: Supplier)`: CompletableFuture - Runs the provided supplier function in KubeJS' background thread and returns its CompletableFuture + +## Examples + +WIP + +<| + From 319e4180d8cb284a0e3035a0c7b01a1ce9950032 Mon Sep 17 00:00:00 2001 From: Hunter19823 Date: Sat, 29 Nov 2025 18:53:22 -0700 Subject: [PATCH 08/12] Fixed the tabs not being closed correctly. --- wiki/global-scope/bindings/page.kubedoc | 1 + 1 file changed, 1 insertion(+) diff --git a/wiki/global-scope/bindings/page.kubedoc b/wiki/global-scope/bindings/page.kubedoc index 77134f1d..2b067bdf 100644 --- a/wiki/global-scope/bindings/page.kubedoc +++ b/wiki/global-scope/bindings/page.kubedoc @@ -211,3 +211,4 @@ Each binding is registered for specific script types (startup, server, or client | `Client` | ✓ | - | ✓ | Minecraft client instance (client-side only) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/client/BuiltinKubeJSClientPlugin.java#L22) | | `Painter` | ✓ | - | ✓ | Painter instance (client-side only) | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/client/BuiltinKubeJSClientPlugin.java#L23) | +<| \ No newline at end of file From bfd96588b6b004902838d63726b2d83727ce4b03 Mon Sep 17 00:00:00 2001 From: Hunter19823 Date: Sat, 29 Nov 2025 18:54:32 -0700 Subject: [PATCH 09/12] Fixed the markdown table formatting --- wiki/global-scope/bindings/page.kubedoc | 3 --- 1 file changed, 3 deletions(-) diff --git a/wiki/global-scope/bindings/page.kubedoc b/wiki/global-scope/bindings/page.kubedoc index 2b067bdf..ef9941c7 100644 --- a/wiki/global-scope/bindings/page.kubedoc +++ b/wiki/global-scope/bindings/page.kubedoc @@ -5,7 +5,6 @@ Each binding is registered for specific script types (startup, server, or client |> 1.21.1 | Binding | Startup | Server | Client | Description | Source | -|---------|---------|--------|--------|-------------|--------| | `global` | ✓ | ✓ | ✓ | Global object map for sharing data between scripts | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L408) | | `Platform` | ✓ | ✓ | ✓ | Platform information and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L409) | | `console` | ✓ | ✓ | ✓ | Console object for logging | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/371dcb1644cf2177368880880bbeb6947fecc0b9/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java#L410) | @@ -80,7 +79,6 @@ Each binding is registered for specific script types (startup, server, or client <||> 1.20.1 | Binding | Startup | Server | Client | Description | Source | -|---------|---------|--------|--------|-------------|--------| | `global` | ✓ | ✓ | ✓ | Global object map for sharing data between scripts | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L341) | | `Platform` | ✓ | ✓ | ✓ | Platform information and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L342) | | `console` | ✓ | ✓ | ✓ | Console object for logging | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/d4a217db34464c94fbbe85495385d43c2b581d41/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L343) | @@ -148,7 +146,6 @@ Each binding is registered for specific script types (startup, server, or client <||> 1.19.2 | Binding | Startup | Server | Client | Description | Source | -|---------|---------|--------|--------|-------------|--------| | `global` | ✓ | ✓ | ✓ | Global object map for sharing data between scripts | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L330) | | `Platform` | ✓ | ✓ | ✓ | Platform information and utilities | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L331) | | `console` | ✓ | ✓ | ✓ | Console object for logging | [KubeJS](https://github.com/KubeJS-Mods/KubeJS/blob/9e04493853cf69ccb0dcd794c0322c8176276a30/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java#L332) | From 429b4bc608497a8c571ea2016bf3a5ca6356a2e8 Mon Sep 17 00:00:00 2001 From: Hunter19823 Date: Sun, 30 Nov 2025 13:20:48 -0700 Subject: [PATCH 10/12] Moved and refactored global and console. --- .../bindings/console/page.kubedoc | 142 ------------------ .../global-scope/bindings/global/page.kubedoc | 62 -------- .../bindings => ref}/console/en.yml | 0 wiki/ref/console/page.kubedoc | 64 ++++++++ .../bindings => ref}/global/en.yml | 6 +- wiki/ref/global/page.kubedoc | 100 ++++++++++++ 6 files changed, 167 insertions(+), 207 deletions(-) delete mode 100644 wiki/global-scope/bindings/console/page.kubedoc delete mode 100644 wiki/global-scope/bindings/global/page.kubedoc rename wiki/{global-scope/bindings => ref}/console/en.yml (100%) create mode 100644 wiki/ref/console/page.kubedoc rename wiki/{global-scope/bindings => ref}/global/en.yml (96%) create mode 100644 wiki/ref/global/page.kubedoc diff --git a/wiki/global-scope/bindings/console/page.kubedoc b/wiki/global-scope/bindings/console/page.kubedoc deleted file mode 100644 index 83d725a2..00000000 --- a/wiki/global-scope/bindings/console/page.kubedoc +++ /dev/null @@ -1,142 +0,0 @@ -# console - -**Java Class:** `dev.latvian.mods.kubejs.script.ConsoleJS` - [View on GitHub](https://github.com/KubeJS-Mods/KubeJS) - -The `console` binding provides a logging interface for outputting messages to the game's console and log files. This is essential for debugging your scripts and understanding what your code is doing. - -All console messages are written to the KubeJS log files, and errors/warnings are also displayed in-game when they occur. - -|> 1.21.1 - -**Source:** [ConsoleJS.java](https://github.com/KubeJS-Mods/KubeJS/blob/main/src/main/java/dev/latvian/mods/kubejs/script/ConsoleJS.java) - -## Script Types - -- Startup: ✓ -- Server: ✓ -- Client: ✓ - -## Members - -### Basic Logging Methods - -- `console.log(...message: Object[])`: void - Logs one or more messages as info-level messages. This is the most common method for general output. -- `console.info(message: Object)`: ConsoleLine - Logs a single message at info level. Returns a ConsoleLine object. -- `console.infof(message: string, ...args: Object[])`: ConsoleLine - Logs a formatted message at info level. Uses string formatting (like `"Hello %s"` with `args`). - -### Warning Methods - -- `console.warn(message: Object)`: ConsoleLine - Logs a warning message. Warnings indicate something that might be wrong but doesn't prevent the script from running. -- `console.warnf(message: string, ...args: Object[])`: ConsoleLine - Logs a formatted warning message. -- `console.warn(message: string, error: Throwable)`: ConsoleLine - Logs a warning with an associated error/exception. - -### Error Methods - -- `console.error(message: Object)`: ConsoleLine - Logs an error message. Errors indicate problems that may prevent functionality from working correctly. -- `console.errorf(message: string, ...args: Object[])`: ConsoleLine - Logs a formatted error message. -- `console.error(message: string, error: Throwable)`: ConsoleLine - Logs an error with an associated error/exception. - -### Debug Methods - -- `console.debug(message: Object)`: ConsoleLine | null - Logs a debug message. Debug messages are only shown when debug mode is enabled. -- `console.debugf(message: string, ...args: Object[])`: ConsoleLine | null - Logs a formatted debug message. - -### Properties - -- `console.errors`: Collection - A collection of all error messages logged to this console. -- `console.warnings`: Collection - A collection of all warning messages logged to this console. - -## Examples - -WIP - -<||> 1.20.1 - -**Source:** [ConsoleJS.java](https://github.com/KubeJS-Mods/KubeJS/blob/2001/common/src/main/java/dev/latvian/mods/kubejs/util/ConsoleJS.java) - -## Script Types - -- Startup: ✓ -- Server: ✓ -- Client: ✓ - -## Members - -### Basic Logging Methods - -- `console.log(...message: Object[])`: void - Logs one or more messages as info-level messages -- `console.info(message: Object)`: ConsoleLine - Logs a single message at info level -- `console.infof(message: string, ...args: Object[])`: ConsoleLine - Logs a formatted message at info level - -### Warning Methods - -- `console.warn(message: Object)`: ConsoleLine - Logs a warning message -- `console.warnf(message: string, ...args: Object[])`: ConsoleLine - Logs a formatted warning message -- `console.warn(message: string, error: Throwable)`: ConsoleLine - Logs a warning with an associated error - -### Error Methods - -- `console.error(message: Object)`: ConsoleLine - Logs an error message -- `console.errorf(message: string, ...args: Object[])`: ConsoleLine - Logs a formatted error message -- `console.error(message: string, error: Throwable)`: ConsoleLine - Logs an error with an associated error - -### Debug Methods - -- `console.debug(message: Object)`: ConsoleLine | null - Logs a debug message (only shown when debug mode is enabled) -- `console.debugf(message: string, ...args: Object[])`: ConsoleLine | null - Logs a formatted debug message - -### Properties - -- `console.errors`: Collection - A collection of all error messages logged to this console -- `console.warnings`: Collection - A collection of all warning messages logged to this console - -## Examples - -WIP - -<||> 1.19.2 - -**Source:** [ConsoleJS.java](https://github.com/KubeJS-Mods/KubeJS/blob/1902/common/src/main/java/dev/latvian/mods/kubejs/util/ConsoleJS.java) - -## Script Types - -- Startup: ✓ -- Server: ✓ -- Client: ✓ - -## Members - -### Basic Logging Methods - -- `console.log(...message: Object[])`: void - Logs one or more messages as info-level messages -- `console.info(message: Object)`: ConsoleLine - Logs a single message at info level -- `console.infof(message: string, ...args: Object[])`: ConsoleLine - Logs a formatted message at info level - -### Warning Methods - -- `console.warn(message: Object)`: ConsoleLine - Logs a warning message -- `console.warnf(message: string, ...args: Object[])`: ConsoleLine - Logs a formatted warning message -- `console.warn(message: string, error: Throwable)`: ConsoleLine - Logs a warning with an associated error - -### Error Methods - -- `console.error(message: Object)`: ConsoleLine - Logs an error message -- `console.errorf(message: string, ...args: Object[])`: ConsoleLine - Logs a formatted error message -- `console.error(message: string, error: Throwable)`: ConsoleLine - Logs an error with an associated error - -### Debug Methods - -- `console.debug(message: Object)`: ConsoleLine | null - Logs a debug message (only shown when debug mode is enabled) -- `console.debugf(message: string, ...args: Object[])`: ConsoleLine | null - Logs a formatted debug message - -### Properties - -- `console.errors`: Collection - A collection of all error messages logged to this console -- `console.warnings`: Collection - A collection of all warning messages logged to this console - -## Examples - -WIP - -<| - diff --git a/wiki/global-scope/bindings/global/page.kubedoc b/wiki/global-scope/bindings/global/page.kubedoc deleted file mode 100644 index 6524b2a4..00000000 --- a/wiki/global-scope/bindings/global/page.kubedoc +++ /dev/null @@ -1,62 +0,0 @@ -# global - -**Java Class:** `Map` - [View Java Documentation](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Map.html) - -Global object map for sharing data between scripts. You can use this to set objects and callbacks in startup script and reference them from server or client scripts. - -|> 1.21.1 - -**Note:** This is a standard Java `Map` object. It's registered as a binding in [BuiltinKubeJSPlugin.java](https://github.com/KubeJS-Mods/KubeJS/blob/main/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java). - -## Script Types - -- Startup: ✓ -- Server: ✓ -- Client: ✓ - -## Members - -This is a standard JavaScript Map/object. You can set and get properties on it directly. - -## Examples - -WIP - -<||> 1.20.1 - -**Note:** This is a standard Java `Map` object. It's registered as a binding in [BuiltinKubeJSPlugin.java](https://github.com/KubeJS-Mods/KubeJS/blob/2001/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java). - -## Script Types - -- Startup: ✓ -- Server: ✓ -- Client: ✓ - -## Members - -This is a standard JavaScript Map/object. You can set and get properties on it directly. - -## Examples - -WIP - -<||> 1.19.2 - -**Note:** This is a standard Java `Map` object. It's registered as a binding in [BuiltinKubeJSPlugin.java](https://github.com/KubeJS-Mods/KubeJS/blob/1902/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java). - -## Script Types - -- Startup: ✓ -- Server: ✓ -- Client: ✓ - -## Members - -This is a standard JavaScript Map/object. You can set and get properties on it directly. - -## Examples - -WIP - -<| - diff --git a/wiki/global-scope/bindings/console/en.yml b/wiki/ref/console/en.yml similarity index 100% rename from wiki/global-scope/bindings/console/en.yml rename to wiki/ref/console/en.yml diff --git a/wiki/ref/console/page.kubedoc b/wiki/ref/console/page.kubedoc new file mode 100644 index 00000000..7752554e --- /dev/null +++ b/wiki/ref/console/page.kubedoc @@ -0,0 +1,64 @@ +The `console` binding provides a logging interface for outputting messages to the game's console and log files. This is essential for debugging your scripts and understanding what your code is doing. + +All console messages are written to the KubeJS log files, and errors/warnings are also displayed in-game when they occur. + +**Java Class:** `dev.latvian.mods.kubejs.script.ConsoleJS` - [View on GitHub](https://github.com/KubeJS-Mods/KubeJS) + +--- +# Properties +--- +## $$.errors: Collection +A collection of all error messages logged to this console. +--- +## $$.warnings: Collection +A collection of all warning messages logged to this console. +--- +# Methods +--- +## $$.log(...message: Object[]): void +Logs one or more messages as info-level messages. This is the most common method for general output. +--- +## $$.info(message: Object): ConsoleLine +Logs a single message at info level. Returns a ConsoleLine object. +--- +## $$.infof(message: string, ...args: Object[]): ConsoleLine +Logs a formatted message at info level. Uses string formatting (like `"Hello %s"` with `args`). +--- +## $$.warn(message: Object): ConsoleLine +Logs a warning message. Warnings indicate something that might be wrong but doesn't prevent the script from running. +--- +## $$.warnf(message: string, ...args: Object[]): ConsoleLine +Logs a formatted warning message. +--- +## $$.warn(message: string, error: Throwable): ConsoleLine +Logs a warning with an associated error/exception. +--- +## $$.error(message: Object): ConsoleLine +Logs an error message. Errors indicate problems that may prevent functionality from working correctly. +--- +## $$.errorf(message: string, ...args: Object[]): ConsoleLine +Logs a formatted error message. +--- +## $$.error(message: string, error: Throwable): ConsoleLine +Logs an error with an associated error/exception. +--- +## $$.debug(message: Object): ConsoleLine | null +Logs a debug message. Debug messages are only shown when debug mode is enabled. +--- +## $$.debugf(message: string, ...args: Object[]): ConsoleLine | null +Logs a formatted debug message. + +|> 1.21.1 + +**Source:** [ConsoleJS.java](https://github.com/KubeJS-Mods/KubeJS/blob/main/src/main/java/dev/latvian/mods/kubejs/script/ConsoleJS.java) + +<||> 1.20.1 + +**Source:** [ConsoleJS.java](https://github.com/KubeJS-Mods/KubeJS/blob/2001/common/src/main/java/dev/latvian/mods/kubejs/util/ConsoleJS.java) + +<||> 1.19.2 + +**Source:** [ConsoleJS.java](https://github.com/KubeJS-Mods/KubeJS/blob/1902/common/src/main/java/dev/latvian/mods/kubejs/util/ConsoleJS.java) + +<| + diff --git a/wiki/global-scope/bindings/global/en.yml b/wiki/ref/global/en.yml similarity index 96% rename from wiki/global-scope/bindings/global/en.yml rename to wiki/ref/global/en.yml index a9546a8c..151fe29a 100644 --- a/wiki/global-scope/bindings/global/en.yml +++ b/wiki/ref/global/en.yml @@ -1,3 +1,3 @@ -title: "global" -description: "Global object map for sharing data between scripts" - +title: "global" +description: "Global object map for sharing data between scripts" + diff --git a/wiki/ref/global/page.kubedoc b/wiki/ref/global/page.kubedoc new file mode 100644 index 00000000..4b62fff8 --- /dev/null +++ b/wiki/ref/global/page.kubedoc @@ -0,0 +1,100 @@ +Global object map for sharing data between scripts. You can use this to set objects and callbacks in startup script and reference them from server or client scripts. + +**Java Class:** `java.util.Map` - [View Java Documentation](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Map.html) + +--- +# Properties +--- +## $$.size: int +Returns the number of key-value mappings in this map. +--- +## Property Access Syntax +Java `Map` objects in KubeJS can be accessed using JavaScript object syntax, allowing for flexible key access in multiple ways: + +**Bracket notation with string literals:** +```js +global["My Property Name"] = "value"; +let value = global["My Property Name"]; +``` + +**Dot notation:** +```js +global.myPropertyName = "value"; +let value = global.myPropertyName; +``` + +**Dynamic key access:** +```js +let key = "example"; +global[key] = "value"; +let value = global[key]; +``` + +All of these syntaxes work for both reading and writing values. This is the most common way to interact with `global` in scripts. + +--- +# Methods +--- +Since `global` is a standard Java `Map`, it supports all standard Map methods. You can also use it as a JavaScript object with property access syntax (e.g., `global.propertyName = value`). + +## $$.get(key: String): Object +Returns the value associated with the specified key, or `undefined` if the key is not present. +--- +## $$.put(key: String, value: Object): Object +Associates the specified value with the specified key. Returns the previous value associated with the key, or `undefined` if there was no mapping. + +#[[red|(Only available in startup scripts in 1.21.1+)]] +--- +## $$.set(key: String, value: Object): Object +Alias for `put()`. Associates the specified value with the specified key. Returns the previous value associated with the key, or `undefined` if there was no mapping. + +#[[red|(Only available in startup scripts in 1.21.1+)]] +--- +## $$.containsKey(key: String): boolean +Returns `true` if this map contains a mapping for the specified key. +--- +## $$.has(key: String): boolean +Alias for `containsKey()`. Returns `true` if this map contains a mapping for the specified key. +--- +## $$.remove(key: String): Object +Removes the mapping for the specified key from this map if present. Returns the value that was associated with the key, or `undefined` if there was no mapping. + +#[[red|(Only available in startup scripts in 1.21.1+)]] +--- +## $$.clear(): void +Removes all mappings from this map. + +#[[red|(Only available in startup scripts in 1.21.1+)]] +--- +## $$.isEmpty(): boolean +Returns `true` if this map contains no key-value mappings. +--- +## $$.keySet(): Set +Returns a Set view of the keys contained in this map. +--- +## $$.values(): Collection +Returns a Collection view of the values contained in this map. +--- +## $$.entrySet(): Set> +Returns a Set view of the mappings contained in this map. + +|> 1.21.1 + +**Source:** [BuiltinKubeJSPlugin.java](https://github.com/KubeJS-Mods/KubeJS/blob/main/src/main/java/dev/latvian/mods/kubejs/plugin/builtin/BuiltinKubeJSPlugin.java) + +In startup scripts, `global` is a mutable `HashMap`. In server and client scripts, it is wrapped in `Collections.unmodifiableMap()`, making it read-only. + +<||> 1.20.1 + +**Source:** [BuiltinKubeJSPlugin.java](https://github.com/KubeJS-Mods/KubeJS/blob/2001/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java) + +`global` is always mutable across all script types. + +<||> 1.19.2 + +**Source:** [BuiltinKubeJSPlugin.java](https://github.com/KubeJS-Mods/KubeJS/blob/1902/common/src/main/java/dev/latvian/mods/kubejs/BuiltinKubeJSPlugin.java) + +`global` is always mutable across all script types. + +<| + From 1e7bf6768752e08513f2d4e785fe6ccaeb958d95 Mon Sep 17 00:00:00 2001 From: Hunter19823 Date: Sun, 30 Nov 2025 13:24:09 -0700 Subject: [PATCH 11/12] Updated the spread operator. --- wiki/ref/console/page.kubedoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wiki/ref/console/page.kubedoc b/wiki/ref/console/page.kubedoc index 7752554e..1971c98a 100644 --- a/wiki/ref/console/page.kubedoc +++ b/wiki/ref/console/page.kubedoc @@ -15,19 +15,19 @@ A collection of all warning messages logged to this console. --- # Methods --- -## $$.log(...message: Object[]): void +## $$.log(message: ...Object[]): void Logs one or more messages as info-level messages. This is the most common method for general output. --- ## $$.info(message: Object): ConsoleLine Logs a single message at info level. Returns a ConsoleLine object. --- -## $$.infof(message: string, ...args: Object[]): ConsoleLine +## $$.infof(message: string, args: ...Object[]): ConsoleLine Logs a formatted message at info level. Uses string formatting (like `"Hello %s"` with `args`). --- ## $$.warn(message: Object): ConsoleLine Logs a warning message. Warnings indicate something that might be wrong but doesn't prevent the script from running. --- -## $$.warnf(message: string, ...args: Object[]): ConsoleLine +## $$.warnf(message: string, args: ...Object[]): ConsoleLine Logs a formatted warning message. --- ## $$.warn(message: string, error: Throwable): ConsoleLine @@ -36,7 +36,7 @@ Logs a warning with an associated error/exception. ## $$.error(message: Object): ConsoleLine Logs an error message. Errors indicate problems that may prevent functionality from working correctly. --- -## $$.errorf(message: string, ...args: Object[]): ConsoleLine +## $$.errorf(message: string, args: ...Object[]): ConsoleLine Logs a formatted error message. --- ## $$.error(message: string, error: Throwable): ConsoleLine @@ -45,7 +45,7 @@ Logs an error with an associated error/exception. ## $$.debug(message: Object): ConsoleLine | null Logs a debug message. Debug messages are only shown when debug mode is enabled. --- -## $$.debugf(message: string, ...args: Object[]): ConsoleLine | null +## $$.debugf(message: string, args: ...Object[]): ConsoleLine | null Logs a formatted debug message. |> 1.21.1 From 1c302962cf8e292ec1f65527503f568a732f0284 Mon Sep 17 00:00:00 2001 From: Hunter19823 Date: Sun, 30 Nov 2025 13:26:49 -0700 Subject: [PATCH 12/12] Removed spread operator temporarily. --- wiki/ref/console/page.kubedoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wiki/ref/console/page.kubedoc b/wiki/ref/console/page.kubedoc index 1971c98a..1c148d82 100644 --- a/wiki/ref/console/page.kubedoc +++ b/wiki/ref/console/page.kubedoc @@ -15,19 +15,19 @@ A collection of all warning messages logged to this console. --- # Methods --- -## $$.log(message: ...Object[]): void +## $$.log(message: Object[]): void Logs one or more messages as info-level messages. This is the most common method for general output. --- ## $$.info(message: Object): ConsoleLine Logs a single message at info level. Returns a ConsoleLine object. --- -## $$.infof(message: string, args: ...Object[]): ConsoleLine +## $$.infof(message: string, args: Object[]): ConsoleLine Logs a formatted message at info level. Uses string formatting (like `"Hello %s"` with `args`). --- ## $$.warn(message: Object): ConsoleLine Logs a warning message. Warnings indicate something that might be wrong but doesn't prevent the script from running. --- -## $$.warnf(message: string, args: ...Object[]): ConsoleLine +## $$.warnf(message: string, args: Object[]): ConsoleLine Logs a formatted warning message. --- ## $$.warn(message: string, error: Throwable): ConsoleLine @@ -36,7 +36,7 @@ Logs a warning with an associated error/exception. ## $$.error(message: Object): ConsoleLine Logs an error message. Errors indicate problems that may prevent functionality from working correctly. --- -## $$.errorf(message: string, args: ...Object[]): ConsoleLine +## $$.errorf(message: string, args: Object[]): ConsoleLine Logs a formatted error message. --- ## $$.error(message: string, error: Throwable): ConsoleLine @@ -45,7 +45,7 @@ Logs an error with an associated error/exception. ## $$.debug(message: Object): ConsoleLine | null Logs a debug message. Debug messages are only shown when debug mode is enabled. --- -## $$.debugf(message: string, args: ...Object[]): ConsoleLine | null +## $$.debugf(message: string, args: Object[]): ConsoleLine | null Logs a formatted debug message. |> 1.21.1