MatrexsVigil / harvestcraft

All rights reserved - None of my artwork is available to be used for FREE in your game EVER. If you want to HIRE ME, please contact me. Thank you. This code is here for people to learn from and to help find bugs ONLY.
https://www.patreon.com/pamsmods
89 stars 85 forks source link

Doesn't this cause the unnecessary processing every single time onInteraction is called? #436

Open coderepo8593 opened 3 years ago

coderepo8593 commented 3 years ago

https://github.com/MatrexsVigil/harvestcraft/blob/8f0a903a94ac07a06c446e79f7f1ecdff55e2cad/src/main/java/com/pam/harvestcraft/events/AnimalBreedingEvent.java#L24

If I understand how subscribing this event works, isn't this going to cause the OreDictionary to be loaded and this list created every single time onInteraction is called? Wouldn't you want to put something like this in handleBreedItem or one of the conditional statements so that it doesn't happen every single time?