Skip to content
ilgaxPublic

About

Kotlin Scripting in Minecraft

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Minekt

Minekt

Kotlin scripts for Minecraft. Write a small .kts file, type its name in chat, and it runs inside the game. Edit it and run it again: no restart.

Beta 0.1.0 · Fabric · Minecraft 26.3 · Java 25 · GPL-3.0-or-later

Beta: things may still change before 1.0. Each release lists what changed.

Install

  1. Install Fabric Loader for Minecraft 26.3 (it needs Java 25).
  2. Put these in .minecraft/mods:
  3. Start the game and open a world. Type \hello in chat.

Your first script

Scripts live in .minecraft/minekt/ (Minekt creates it, with a few examples). Save this as .minecraft/minekt/ores.kts, then type \ores in chat:

val ores = findBlocks(16) { it.endsWith("_ore") }
echo("${ores.size} ores nearby")
ores.firstOrNull()?.let { echo("nearest:", it.id, "at", it.pos) }

Change it, save, and type \ores again: it runs the new version. Your first scripts goes on from here, and examples/ has more to copy: a radar, a minimap, tracers, a custom crosshair…

In-game commands

Command
\<script> [args] run <script>.kts from .minecraft/minekt/
\menu the script manager: run, stop, settings and logs
\jobs, \kill <id|all> see and stop running scripts
\install <link> install someone's script, after showing what it can do
\help every command

With Mod Menu, Minekt's settings are under Configure. More in Getting started.

On a server: put the same three jars in the server's mods folder. Operators run scripts from the server's minekt/ folder with /mks run <script>. See Server scripts.

Scripts can do anything on your computer, not just in the game. Only run scripts you trust, and check a server's rules before using automation there.

For power users

Scripts are full Kotlin with the game and every installed mod on hand, and mod code works in them as it is.

All the docs: docs/.

AI disclosure

A large part of Minekt's code, tests and documentation was written with the help of an AI. I review and test the changes, and every release is built only after the automated tests and the real-server tests pass. No vibeslop here trust.

License

GPL-3.0-or-later. See LICENSE.

About

Kotlin Scripting in Minecraft

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages