tomdodd4598 / NuclearCraft

NuclearCraft is a Forge mod for Minecraft 1.12.2.
https://www.curseforge.com/minecraft/mc-mods/nuclearcraft-overhauled
MIT License
196 stars 128 forks source link

NuclearCraft registers tons of invalid OreDictionary entries #585

Closed OneEyeMaker closed 5 years ago

OneEyeMaker commented 5 years ago

The title says it all. Mod registers tons of empty OreDictionary entries. (Empty entry = entry with name but without any associated ItemStacks). Most of these entries are modified names of fluids (!!!). For example: ingotBiodiesel, gemBio.ethanol and so on.

I guess, one of the causes of this bug is usage of method OreDictionary.getOres(String). This method creates empty entry if fails to find existing one. Instead you should use OreDictionary.getOres(String, boolean) (with second argument = false) in most cases.

P. S. Please, fix this issue before overhaul.

OneEyeMaker commented 5 years ago

Example of creating invalid OreDictionary entry: 1) https://github.com/turbodiesel4598/NuclearCraft/blob/master/src/main/java/nc/recipe/processor/IngotFormerRecipes.java#L139-L140 2) https://github.com/turbodiesel4598/NuclearCraft/blob/master/src/main/java/nc/util/OreDictHelper.java#L56-L58

tomdodd4598 commented 5 years ago

Ah, I did not realise - fixed!