Simply Tea!

Simply Tea!

2M Downloads

What does items.add do, and where is it defined at?

TheFoss opened this issue ยท 2 comments

commented

https://github.com/elucent/SimplyTea/blob/39a58f39eaae514fe98de8167dae54c29845cb28/src/main/java/elucent/simplytea/SimplyTea.java#L667

I'm trying to build a mod at the moment, and SimplyTea is a pretty good example of how some of the basic tasks like adding items can be done. That said, I'm stumped as to where this comes from. Eclipse says that "items cannot be resolved." Where is "items.add" defined?

commented

8 lines above there. It is adding the item to a list so the instances can be created in preInit while still registering them at the proper time. I would personally recommending creating them directly in the block and item events with some small helper functions, though either approache istechnically fine.

Personally, I would not say SimplyTea is the best example for making a mod as Elucent purposely coded it oddly in one class file essentially since it was small enough he could. If you want to learn from something with a similar style, GravelOres might be a better choice, or alternatively own mod Ceramics shows some different methods of handling things.

commented

Ah, thank you! I'll take a look at the other two.