Open Nevrai opened 2 years ago
I found documentation on 1.16 ContentTweaker which I used to make this:
new BlockBuilder(<blockmaterial:stone>)
.build("kvikk_lunsj_ore");
.withHarvestLevel(3);
.withHardnessAndResistance(2.7);
.withHarvestTool(<tooltype:pickaxe>);
.setBlockSoundType(<soundtype:minecraft:stone>);
.setDropHandler(function(drops, world, position, state, item){
drops.clear();
drops.add(<item:contenttweaker:kvikk_lunsj_piece>);
drops.add(<item:contenttweaker:kvikk_lunsj_piece> % 30);
drops.add(<item:contenttweaker:kvikk_lunsj> % 6);
drops.add(<item:contenttweaker:kvikk_lunsj_six_pack> % 1);
});
I’m not sure if this is right. It probably isn’t. I can’t find any documentation on how to add a loot table, so I don’t know how to make it drop what I want, since that part of the code above uses the 1.12.2 syntax.
I can’t figure out how to add food items either.
The Syntax is completely different in 1.18.
Use /ct examples
to generate examples files that should help with what you want to do
My two ContentTweaker scripts aren’t working in 1.18.2 (Forge).
Blocks script: https://pastebin.com/raw/HT2cXEFp Items script: https://pastebin.com/raw/i3KbKY9C
Neither script will load, and I’m getting these syntax errors:
I’m sure I’m doing something wrong, but scripts with the same kind of syntax worked in 1.12.2, and the syntax is in accordance with the documentation I’m able to find on the ContentTweaker wiki. As far as I can tell, the scripts have proper syntax. I assume something changed in the 1.18.2 version in relation to syntax, but I can’t find up-to-date information.
crafttweaker.log: https://pastebin.com/raw/cmg8f6JZ
Versions