promotional bannermobile promotional banner

LiveScript

Unlisted
In-game JavaScript and Lua scripting for NeoForge with a built-in live code editor, hot-reload, autocomplete, and runtime event APIs.

LiveScript

LiveScript is an in-game JavaScript and Lua scripting mod for NeoForge 1.21.1. It combines the flexibility of KubeJS with the live editing experience of ComputerCraft — but with a modern fullscreen editor directly inside Minecraft.

Security & Sandboxing

LiveScript embeds Mozilla Rhino (JavaScript) and LuaJ (Lua) as sandboxed scripting engines. Scripts cannot:

  • Access the filesystem (java.io.File, java.nio.file.* blocked)
  • Start subprocesses (java.lang.Runtime, java.lang.ProcessBuilder blocked)
  • Use reflection (java.lang.reflect.* blocked)
  • Make network requests (java.net.* blocked)

Each script has a 5-second CPU timeout. Only server operators (permission level 2, i.e. /op) can open the editor or execute scripts. The /scripteditor command uses the same permission gate as /give or /setblock.

This is the same security model as KubeJS, GroovyScript, CraftTweaker, and ComputerCraft.

Full source code: https://github.com/GrafKakashi/livescript — verify the sandbox in JsEngine.java and LuaEngine.java.

Features

  • Fullscreen in-game code editor
  • JavaScript (Rhino) and Lua (LuaJ) support
  • Live script execution and hot-reload
  • Syntax highlighting
  • Autocomplete
  • Undo / Redo
  • Code folding
  • Find & Replace
  • Runtime event APIs
  • Recipe manipulation APIs
  • Custom item registration via items.json with runtime textures
  • Tag and item utilities
  • Startup scripts with priority ordering
  • Built-in script console
  • Sandbox and timeout protection
  • CurseForge update notifications for operators

Included APIs

Events

Listen to gameplay events like:

  • player.join, player.leave, player.chat, player.death, player.respawn, player.dimension_change
  • block.break, block.place
  • item.craft, item.smelt, item.use, item.use_block, item.pickup
  • entity.spawn, entity.death, entity.damage
  • mob.target
  • explosion.start, explosion.detonate
  • server.tick

Recipes

Add or remove recipes at runtime — all 5 cooking types (smelting, smoking, blasting, campfire, stonecutting) plus shaped/shapeless crafting:

```javascript recipe.shapedAdd({ id: 'livescript:magic_diamond', pattern: ['DDD', 'DND', 'DDD'], key: { D: 'minecraft:diamond', N: 'minecraft:nether_star' }, result: { item: 'minecraft:diamond', name: '§bMagic Diamond', lore: ['§7Pulsates with arcane energy'], glow: true } });

recipe.removeByOutput('minecraft:torch'); ```

Custom Items

Define custom items in config/livescript/items.json, drop PNG textures in config/livescript/textures/, restart server:

```json { "items": { "magic_dust": { "display_name": "Magic Dust", "max_stack_size": 64, "rarity": "rare" } } } ```

Tags & Items

tag.itemsIn('minecraft:logs'), tag.itemHas(itemStack, 'minecraft:logs'), item.byId('minecraft:diamond'), and more.

Quick Start

  1. Install the mod (NeoForge 1.21.1)
  2. Start your world / server
  3. As operator, run /scripteditor
  4. Press the + button, create example.js, write some code, click Save & Run

Links

Compatibility

  • Minecraft 1.21.1 only
  • NeoForge 21.1+
  • Works alongside KubeJS, CC: Tweaked, and other scripting mods (no classpath conflicts thanks to shaded Rhino/LuaJ)

LiveScript Team

profile avatar
  • 1
    Followers
  • 3
    Projects
  • 5.9K
    Downloads

More from Graf_Kakashi

  • Sophisticated ATM Tiers project image

    Sophisticated ATM Tiers

    Adds Allthemodium, Vibranium & Unobtainium tiers with bigger storage and matching stack upgrades to Sophisticated Backpacks & Storage.

    • 5.4K
    • October 4, 2026
  • PrismTorch project image

    PrismTorch

    PrismTorch adds colored torches that each stop a specific category of mobs — hostiles, animals, phantoms, guardians, the Warden and more — from spawning within a configurable radius, plus a rainbow Master Torch that blocks them all.

    • 442
    • July 11, 2026
  • Sophisticated ATM Tiers project image

    Sophisticated ATM Tiers

    Adds Allthemodium, Vibranium & Unobtainium tiers with bigger storage and matching stack upgrades to Sophisticated Backpacks & Storage.

    • 5.4K
    • October 4, 2026
  • PrismTorch project image

    PrismTorch

    PrismTorch adds colored torches that each stop a specific category of mobs — hostiles, animals, phantoms, guardians, the Warden and more — from spawning within a configurable radius, plus a rainbow Master Torch that blocks them all.

    • 442
    • July 11, 2026