CraftTweaker

CraftTweaker

151M Downloads

recipes.craft does not allow null

TheQKnight opened this issue ยท 3 comments

commented

Intro:

recipes.craft does not allow null values in it's IItemStack[][] argument

Issue Description:

My recipes.craft usage is as follows

var slab = recipes.craft([[minecraft:planks, minecraft:planks, minecraft:planks]]);

now this works fine, and slab returns a minecraft slab, but if I want to craft something like stairs

var stairs = recipes.craft([
[minecraft:planks, null, null],
[minecraft:planks, minecraft:planks, null],
[minecraft:planks, minecraft:planks, minecraft:planks]
]);

crafttweaker encounters an error: java.lang.IllegalArgumentException: stack cannot be null

allowing null to be passed through this function is mandatory for certain recipes, so I don't know of any other way to accomplish this.

Updated:
Script: https://gist.github.com/TheQKnight/290ed3af0c7cff45735326617e846b69
Crafttweaker Log: https://gist.github.com/TheQKnight/e9d08be9dd29ec133b317f8d59666a2a


Affected Versions (Do not use "latest"):

  • Minecraft: 1.12.2
  • Forge: 14.23.5.2854
  • Crafttweaker: 1.12-4.1.20.586
  • Using a server: no

Your most recent log file

not required

commented

Please provide the full script.
Your CraftTweaker log mentions lines 460 and 519, and your script only contains 81 lines, so I have no idea at what specific point the execution stops.

commented
commented

@kindlich pushing to a non default branch can't close issues