Now command arguments are supported. Example:
Minecraft.AddCommand("example", {
[0] = {
name = "print",
type = "string", -- can be either string, number, or boolean.
},
[1] = {
name = "yes",
type = "boolean",
}
}, function(_, printt, yes)
if yes then print(printt) end
end --[[Callback]] )
Unsafe functions in libraries have been removed to follow Luau's sandboxing.
debug
library has been added, but removed to a large extent, the only functions present is info
and traceback
.
waitAsync
function is now added.
ForTicks
is now renamed to Tick
.
Using OptiFabric is now a warning and not a crash anymore.
Most of the os
library is removed for sandboxing.
Color3
has been added.
To prevent conflicts with mods, LuaRuntimeClient.loaded
is now LuaRuntimeClient.lua_runtime_mod$loaded
.
The PlaySound
function has been added, though it's not working as of yet.
The ScriptError
void in LuaRuntimeClient
is now package-private.
Scripts can now get the window size.
All versions of 1.21 supported.
Javadoc added.
The Property
class now uses generics.
Scripts can now get the player's username.
LaunchDesktop
class is package-private.
allowListenLinks
in Config
has been renamed to allowListenChat
.
In previous versions, the language level is mistakenly Java 22. This build now uses language level 21, this should fix issues about the wrong Java version.
The Minecraft.LuaRuntimeVersion
property is not a float, now a string.
Scripts can now display a toast.
A script error now appears if you are in-game. (not a dialog)
Clicking the close button on the script error dialog no longer closes the game.
The license has been changed to clearly state it's for later versions of LGPL. Identify licenses clearly!
The code has been reorganized which includes:
- MainClassClient and MainClassServer have been renamed to LuaRuntimeClient and LuaRuntimeServer respectively. If you make extensions to this mod, update your code to point to them.
- Minecraft is now a seperate class of MainClassClient. If you make extensions to this mod, also update your code to
MainClassClient.Instance.LuaInstance.getMainMenuListeners()
Whenever a script error occurs, a dialog appears. (it won't appear if you are in-game or if you are in a server)
A thread that calls tick
only once while starting the game, and does nothing after that, has been removed. It was accidentally left in the code.
When adding a command, the callback is also called with a table that contains SendFeedback
.
The mod now supports versions from 1.21.1 to 1.21.3! The Java requirement (21) is finally enforced.
Instead of the Minecraft.Ticks.Client.ForTicks
event injecting into MinecraftClient
, it now redirects to the Minecraft.Ticks.Client.Start
event.
Minecraft.Version
is not just 1.21.1
, it now depends on the version of the game.
The Minecraft.Loader
property is added.
The Minecraft.LuaRuntimeVersion
property is now changed after not being changed for a long time.
Scripts can now get the dimension of the player.
If the allowListenChat
property is disabled, now it will return an event, unlike older versions, where it won't.
Scripts can now check when a player chats!!
Now scripts can copy a text, open a link, and paste.
Scripts can now check if PojavLauncher is used.
The license has been switched from GPL-3.0 to LGPL-3.0 after we heard about this.