CraftTweaker Functions no longer work in 1.18.1
Flexico opened this issue ยท 2 comments
Minecraft Version
1.18.x
Version
1.100.2
Details
I have the following code to allow equipping netherite tools to turtles, which worked in 1.16.5:
[code]dan200.computercraft.turtle.addTool("minecraft:netherite_pickaxe", item:minecraft:netherite_pickaxe);
dan200.computercraft.turtle.addTool("minecraft:netherite_shovel", item:minecraft:netherite_shovel, "shovel");
dan200.computercraft.turtle.addTool("minecraft:netherite_axe", item:minecraft:netherite_axe, "axe");
dan200.computercraft.turtle.addTool("minecraft:netherite_sword", item:minecraft:netherite_sword, "sword");
dan200.computercraft.turtle.addTool("minecraft:netherite_hoe", item:minecraft:netherite_hoe, "hoe");[/code]
It gives the error: "No such symbol: dan200"
As Max mentioned, this is by design - see #967. You can now register tools just by creating a file in a datapack:
This is expected, as versions > 1.16.5 use datapacks instead for that kind of thing:
https://github.com/cc-tweaked/CC-Tweaked/wiki/CraftTweaker
I'm don't actually know how to do the same with Datapacks, just that, according to the wiki, it's possible.
Maybe when you find out you can add that to the wiki?