EvilCraft

EvilCraft

19M Downloads

Dead Bush Recipe defaults shears to true, corrupting other recipes

noobanidus opened this issue ยท 1 comments

commented

Issue type:

  • ๐Ÿ› Bug

Short description:

Incorrect initial value of variable results in the RecipeDeadBush instance matching every recipe that contains a sapling.

https://github.com/CyclopsMC/EvilCraft/blob/master-1.16/src/main/java/org/cyclops/evilcraft/core/recipe/type/RecipeDeadBush.java#L31

This line should most likely be "false" as the default assumption is that shears have not been found.

Additionally, I'd recommend returning false if the number of items is greater than the number of ingredients (preventing converting 1 sapling and 2 shears into a dead bush), as well as perhaps code to check for duplicate saplings or shears.

Steps to reproduce the problem:

Attempt to craft any recipe that includes a sapling: you will get a dead bush instead.

Expected behaviour:

That it would detect the sapling and not the shears and not say that it is a matching recipe.


Versions:

  • This mod: The current master-1.16 branch.
  • Minecraft: 1.16.4
  • Forge: Uncertain.

Log file:

This isn't relevant, it's easily reproducible and the issue is clear from the code.

Additional

It's not the most perfect implementation, but my shapeless damage recipes and shaped damage recipes are MIT licensed in the Mystical World project: Shaped Damaged allows you to specify the item to be damaged and the amount of damage to apply in the JSON. The Shapeless Damage recipe does the same thing.

These allow for much finer control over the recipe and make it show up in JEI.

commented

Thanks for reporting!