feldim2425 / MoreOverlays

MC Mod : Brings back some of the NEI Overlays ( Mob Spawns, Chunk Bounds, Item Search)
MIT License
22 stars 18 forks source link

Stop self compare if JEI has damageable item #49

Closed Shovinus closed 6 years ago

Shovinus commented 6 years ago

To be honest though you could actually simplify the whole thing to if(stack1.isItemEqualIgnoreDurability(stack) && matchNBT(stack,stack1)) because the first check in isItemEqualIgnoreDurability is to check if the compared stack is damageable, so you are just doing a comparison twice anyway.

feldim2425 commented 6 years ago

I merged it, but I also switched to your suggestion with if(stack1.isItemEqualIgnoreDurability(stack) && matchNBT(stack,stack1)) This seems to fix it. Thanks

Shovinus commented 6 years ago

No worries, cheers for the mod, very very useful.