CraftTweaker

CraftTweaker

151M Downloads

Can't craft with null

JYTGames opened this issue · 9 comments

commented

hey guys Im having troubles with trying to pull null into a recipe, not sure if its the version im on, but I can't really get this working (i am on 1.16.5)
here is the issue
// add recipe for Nethertie Armor
craftingTable.addShaped("item",item:minecraft:netherite_helmet,[
[item:minecraft:netherite_ingot,item:minecraft:netherite_ingot,item:minecraft:netherite_ingot],
[item:minecraft:netherite_ingot,null,item:minecraft:netherite_ingot],
]);

craftingTable.addShaped("item",item:minecraft:netherite_boots,[
[item:minecraft:netherite_ingot,null,item:minecraft:netherite_ingot],
[item:minecraft:netherite_ingot,null,item:minecraft:netherite_ingot],
]);

craftingTable.addShaped("item",item:minecraft:netherite_leggings[
[item:minecraft:netherite_ingot,item:minecraft:netherite_ingot,item:minecraft:netherite_ingot],
[item:minecraft:netherite_ingot,null,item:minecraft:netherite_ingot],
[item:minecraft:netherite_ingot,null,item:minecraft:netherite_ingot]
]);

craftingTable.addShaped("item",item:minecraft:netherite_chestplate[
[item:minecraft:netherite_ingot,null,item:minecraft:netherite_ingot],
[item:minecraft:netherite_ingot,item:minecraft:netherite_ingot,item:minecraft:netherite_ingot],
[item:minecraft:netherite_ingot,item:minecraft:netherite_ingot,item:minecraft:netherite_ingot]
]);

(I accidentally posted this in the minetweaker github :()

commented

Please follow the issue template.
Also, upload your script to a page like gist.github.com or pastebin and provide a link here.
GH's markdown removes some parts so I can't tell if you just didn't write them or if they are missing in your script.

Also, to answer your question, in 1.14+ use <item:minecraft:air> for empty slots

commented

Please follow the issue template.
Also, upload your script to a page like gist.github.com or pastebin and provide a link here.
GH's markdown removes some parts so I can't tell if you just didn't write them or if they are missing in your script.

Also, to answer your question, in 1.14+ use <item:minecraft:air> for empty slots

Thanks but for some reason only the chestplate works for some reason

commented

Post your updated scripts to pastebin

commented
commented

You put your script on pastebin and send us a link to it

commented
commented
commented

okay, the issue is that you are registering 4 recipes under a single recipe name (in this case "item").

The names need to be different, like:

// add recipe for Nethertie Armor
craftingTable.addShaped("netherite_helmet",<item:minecraft:netherite_helmet>,[
    [<item:minecraft:netherite_ingot>,<item:minecraft:netherite_ingot>,<item:minecraft:netherite_ingot>],
    [<item:minecraft:netherite_ingot>,<item:minecraft:air>,<item:minecraft:netherite_ingot>],
]);
 
craftingTable.addShaped("netherite_boots",<item:minecraft:netherite_boots>,[
    [<item:minecraft:netherite_ingot>,<item:minecraft:air>,<item:minecraft:netherite_ingot>],
    [<item:minecraft:netherite_ingot>,<item:minecraft:air>,<item:minecraft:netherite_ingot>],
]);
 
craftingTable.addShaped("netherite_leggings",<item:minecraft:netherite_leggings>,[
    [<item:minecraft:netherite_ingot>,<item:minecraft:netherite_ingot>,<item:minecraft:netherite_ingot>],
    [<item:minecraft:netherite_ingot>,<item:minecraft:air>,<item:minecraft:netherite_ingot>],
    [<item:minecraft:netherite_ingot>,<item:minecraft:air>,<item:minecraft:netherite_ingot>]
]);
 
craftingTable.addShaped("netherite_chestplate",<item:minecraft:netherite_chestplate>,[
    [<item:minecraft:netherite_ingot>,<item:minecraft:air>,<item:minecraft:netherite_ingot>],
    [<item:minecraft:netherite_ingot>,<item:minecraft:netherite_ingot>,<item:minecraft:netherite_ingot>],
    [<item:minecraft:netherite_ingot>,<item:minecraft:netherite_ingot>,<item:minecraft:netherite_ingot>]
]);
commented