Is there any technical reason that the object holder injection is better than using the getValue() method of the registry itself and storing that in a public field? Are they equivalent? Or is there a performance or logical reason that object holder is preferred method?
I'm asking because I'm porting some older mods and in most I set the registry name within the block or item constructor so if I use injection now I have to go through all my blocks and items and dig up the registry na
You should also never statically construct your blocks/items.
So really you need to go through and cleanup your code.
Yes, it's work, but you should do it.
@Draco18sThere IS reason to use @ObjectHolder for your own items, that his current method doesn't support. OVERRIDES. If anyone comes along and says "Screw you I want to override the functionality of your item" then you just silently detect and use it. This way doesn't support that.