- **Change: The `io` library follows Lua 5.3** (rembulan [#15](https://github.com/wizards-of-lua/rembulan/issues/15) to [#26](https://github.com/wizards-of-lua/rembulan/issues/26))
- Wizards of Lua now uses **rembulan 0.5.0**, whose `io` library behaves like the one of Lua 5.3.
- `io.lines(filename)` is available.
- `read` accepts the format names without the asterisk (`"a"`, `"l"`, `"L"`, `"n"`) as well as with it, `read("a")` at the end of a file returns `""` rather than `nil`, and `read(0)` no longer consumes a byte.
- A failed read returns `nil` and a message instead of raising an error, and `read` with several formats stops at the first one that fails.
- `io.output()` returns the default output file. Before, it returned the default input file.
- Closing a file that is already closed raises an error, and `tostring` of a closed file gives `"file (closed)"`.
- The files a spell left open are closed when the spell ends.
- `io.tmpfile` and `io.popen` remain unavailable: a spell may only use files inside the world folder.
- **Fix: `string.format` writes numbers like Lua does, on every server** (rembulan [#27](https://github.com/wizards-of-lua/rembulan/issues/27))
- `%f`, `%e` and `%g` used the server's language settings, so a server set to German wrote `1,5` instead of `1.5`, which broke generated JSON and commands, for example.
- `%g` no longer keeps trailing zeros (`string.format("%.14g", 1)` is `"1"`), a precision of 0 is respected, and numbers are rounded as in Lua.
- **Fix: `]` and `-` as literal characters in pattern sets** (rembulan [#28](https://github.com/wizards-of-lua/rembulan/issues/28))
- A `]` right after the opening bracket, as in `[]]` or `[^]]`, and a `-` right before the closing bracket, as in `[a-]`, are now taken literally, as in Lua.
- **Fix: Large Lua sources can be loaded** (rembulan [#29](https://github.com/wizards-of-lua/rembulan/issues/29), [#30](https://github.com/wizards-of-lua/rembulan/issues/30), [#31](https://github.com/wizards-of-lua/rembulan/issues/31))
- `load` failed for a source of more than 64 KB.
- A chunk with a large table constructor, e.g. a data file with thousands of records, took very long to compile and then failed with "Method too large". Such chunks now compile, and much faster: 20,000 records take about a second instead of half a minute.
- A very large function could run in an endless loop instead of finishing.
- **Fix: Multiple assignment to properties** (rembulan [#32](https://github.com/wizards-of-lua/rembulan/issues/32))
- In an assignment like `spell.yaw, spell.pitch = f()`, where one function call provides several values, only the first target got its value when the targets were properties of an object, and the others raised an error such as "bad argument to 'pitch'". Plain tables and local variables were not affected.
- **Fix: `mob.lookAt` accepts a position**
- `mob.lookAt = Vec3(x, y, z)` raised an error; only an entity worked. Now a `Vec3` or a plain table like `{ x = 1, y = 2, z = 3 }` works as documented.
- **Fix: Block tasks reach blocks they failed to reach**
- `startBreakBlock`, `startPutInto` and `startTakeFrom` failed with "unreachable" when the mob stood on top of the block, e.g. on a chest: its eyes were a little too far from the block's middle for the default `reach`. A mob that stands on the block or right next to it now always reaches it.
- A task on a block high above the ground, e.g. the top barrel of a stack of three, failed with "unreachable" when something else stood nearby that the mob could climb. The mob now walks to a place from which the block is within its `reach`. This applies to `startPlaceBlock` too.
- **Fix: Documentation of `PlayerHandSwingEvent.hand`**
- The API documentation now tells which hand the event reports for which action.
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }