-
New:
WizardsOfLua.global(shared runtime state)- A read-only reference to a mutable, global table available to all spells during the current server runtime.
- Any spell can write to this table; all other spells see the changes immediately.
- The table is cleared on server restart or when running
/wol startup.
-
Breaking Change:
WizardsOfLua.setCommand(...)- The previous boolean return value has been removed.
- The function now throws an error if command registration fails.
-
Dynamic Commands: redesigned registration
- Internal registration no longer relies on
/reload→ improves compatibility with Arclight and other mods that break on reload. - Replacing existing non-dynamic commands (vanilla or from other mods) is no longer supported.
- Extending existing commands remains supported.
- Internal registration no longer relies on
-
Fix:
/wol spell listfrom server console- Resolved unexpected error when executing from the server console. See Issue #24.
- Fix:
LuaEntity.namenow returnsgetName().getString()as intended. - Fix:
Vec3:floor()now correctly converts all components to integers.
-
Fix
/wol extract examples:
Modified files from the extracted Journey example are now loaded correctly. Previously, the mod loaded the bundled copy from the JAR instead of the filesystem, so user edits had no effect. -
Fix (Journey Mini-Game):
- The Journey spell now terminates properly when a player disconnects from the server.
- Disabled verbose log output by default in the Journey mini-game.
You can re-enable it by editingconfig/wizards-of-lua/examples/journey/log_extensions.logand settinglogEnabled = true.
- New Command for Extracting Examples
/wol extract examplespopulatesconfig/wizards-of-lua/examples/with example projects; currently includes the mini-game “Journey.”- After extraction run
/wol startupto register the example’s dynamic commands.
- Command Changes
- Extraction syntax updated: use
/wol extract api(replaces the old/wol extract-api).
- Extraction syntax updated: use
- New Fields on
SpelltickLimit— Per-tick execution budget (in Lua operations). Default 50,000; higher values do more work per tick (potential TPS impact), lower values yield more often for smoother pacing.biome— read-only biome ID atspell.pos(e.g.,"plains","forest"); updates as the spell moves.
- Fix: Resolved a NullPointerException in
Spell:copyStructure(oppositeCorner [, includeEntities, ignoreBlockId])whenignoreBlockIdwas not specified.
-
Fix:
LivingEntity:getItemInHand(hand)no longer throws a NullPointerException when the specified hand is empty. -
API Docs: Adjusted example code that handles NBT data to use the new Minecraft 1.21.5 NBT syntax in:
BlockEntityEntityItemSpell
-
Note: Run
/wol extract-apito update theconfig/wizards-oflua/apifolder with the latest API documentation.
- Fix: Setting
spell.visible = trueno longer throws an exception.
-
New Function:
Server:getWorld(dimension)
Returns a reference to theWorldfor the given dimension name (e.g.,"the_nether","overworld"). -
New Property:
Spell.id
Read-only numeric ID of the spell. -
Updated Methods:
Spell:execute(...)andSpell:executeSilent(...)
Both now return the command result value (typically the number of affected entities/blocks). -
Fix:
World:isLoaded(pos)
Corrected a bug where this function could incorrectly returntruein some cases; behavior now matches the documentation. -
Fix:
EventInterceptor:stop()
This method now actually stops the interceptor from receiving further events. -
New Events
Added hooks to observe or intercept more gameplay actions:
AfterLivingEntityDamageEvent,BeforeLivingEntityDamageEvent,EntityDespawnEvent,EntitySpawnEvent,PlayerAttackBlockEvent,PlayerChangeWorldEvent,PlayerDisconnectedEvent,PlayerDropSelectedItemEvent,PlayerUseEntityEvent.




