Lothrazar / RootsClassic

Port of Roots 1 originally by Elucent (based on latest public MIT version, with permission from EpicSquid)
MIT License
3 stars 13 forks source link

Nullification of Ingredient #107

Open ZigTheHedge opened 4 months ago

ZigTheHedge commented 4 months ago

Minecraft version & Mod Version: 1.20.1, 1.3.1

Single player or Server: Both

Describe problem (what you were doing / what happened): https://github.com/Lothrazar/RootsClassic/blob/b3b92b154daf2b8e148e157304bfaf355fd0e331/src/main/java/elucent/rootsclassic/registry/RootsItemTier.java#L16 https://github.com/Lothrazar/RootsClassic/blob/b3b92b154daf2b8e148e157304bfaf355fd0e331/src/main/java/elucent/rootsclassic/registry/RootsItemTier.java#L21 You shouldn't return null for an Ingredient. Use Ingredient.EMPTY instead. Otherwise it is possible to catch NPE from mods which are trying to get that value (Even IntelliJ says the Ingredient value will never be null, but your code proves its wrong :)