Updated Incompatibilities between versions (markdown)

Jonathan Coates 2023-10-28 20:58:35 +01:00
parent d7f76c2523
commit f6c8caf7fc
1 changed files with 1 additions and 39 deletions

@ -1,39 +1 @@
CC: Tweaked tries to remain as compatible between versions as possible, meaning you should be able to run code written on very old versions of ComputerCraft on the latest version of the mod. However, some changes to the underlying game, or ComputerCraft's own internals may make incompatible.
This page serves as documentation for breaking changes and "gotchas" one should look out for between CC:T versions.
## Minecraft 1.14 to 1.15
- The config file has now been split into client and server config files.
- Client config can be found in `config/computercraft-client.toml`.
- Server config can be found in `saves/<world>/serverconfig/computercraft-server.toml`. These are now save-specific - it is currently impossible to have a global configuration. However, you can create a default config by placing it in `defaultconfigs/computercraft-server.toml`.
- The ComputerCraft Java API has been entirely rewritten to allow for more efficient Lua/Java interop. This should have no impact on users, but makes the API easier to use and reduces overhead.
- The default treasure disks have been entirely removed. They are now added [by an external data pack](https://github.com/cc-tweaked/treasure-disks), which also registers them as dungeon loot. The same system may be used to provide your own loot disks.
- `turtle.getItemDetail` no longer includes damage by default. One must now pass `true` [as the second parameter](https://tweaked.cc/module/turtle.html#v:getItemDetail). `turtle.getItemDetail()` becomes `turtle.getItemDetail(nil, true)`, and `turtle.getItemDetail(slot)` becomes `turtle.getItemDetail(slot, true)`.
## Minecraft 1.12 to 1.13
- The "key code" for [`key`][key_event] and [`key_up`][key_up_event]s has changed, due to Minecraft updating to LWJGL 3. Make sure you're using the constants provided by the [`keys`][keys] API, rather than hard-coding numerical values.
Related to this change, the numpad enter key now has a different key code to the enter key. You may need to adjust your programs to handle both. (Note, the `keys.numpadEnter` constant was defined in pre-1.13 versions of CC, but the `keys.enter` constant was queued when the key was pressed)
- Minecraft 1.13 removed the concept of item damage and block metadata (see ["The Flattening"][flattening]). As a result `turtle.inspect` no longer provides block metadata, and `turtle.getItemDetail` no longer provides damage.
- Block states (`turtle.inspect().state`) should provide all the same information as block metadata, but in a much more understandable format.
- Item and block names now represent a unique item type. For instance, wool is split into 16 separate items (`minecraft:white_wool`, etc...) rather than a single `minecraft:wool` with each meta/damage value specifying the colour.
- Custom ROMs are now provided using Data packs rather than resource packs. This should mostly be a matter of renaming the "assets" folder to "data", and placing it in "datapacks", but there are a couple of other gotchas to look out for:
- Data packs [impose some restrictions on file names](https://minecraft.gamepedia.com/Tutorials/Creating_a_data_pack#Legal_characters). As a result, your programs and directories must all be lower case.
- Due to how data packs are read by CC: Tweaked, you may need to use the `/reload` command to see changes to your pack show up on the computer.
- See [the example datapack](https://github.com/cc-tweaked/datapack-example) for how to get started.
- Turtles can now be waterlogged and move "through" water sources rather than breaking them.
## Minecraft 1.8 to 1.12
- Programs run via `shell.run` are now started in their own isolated environment. This means globals set by programs will not be accessible outside of this program.
- Programs containing `/` are looked up in the current directory and are no longer looked up on the path. For instance, you can no longer type `turtle/excavate` to run `/rom/programs/turtle/excavate.lua`.
- (CC: Tweaked 1.88.0+) Computers now _always_ keep their ID when broken, meaning that unlabelled computers/items do not stack.
[key_event]: https://tweaked.cc/event/key.html
[key_up_event]: https://tweaked.cc/event/key_up.html
[keys]: https://tweaked.cc/module/keys.html
[flattening]: https://minecraft.gamepedia.com/Java_Edition_1.13/Flattening
This page has been moved to [the main CC: Tweaked documentation](https://tweaked.cc/reference/breaking_changes.html).