Static is a modifier that makes a method or variable able to accessed in a static context, or through different classes.
Why, is there something about it I don't understand?
Just checking you knew, many people use static without understanding what it does. Your register method is an identical reimplementation of GameRegistry.registerItem(), except that it's private, why?.
Rollback Post to RevisionRollBack
Please don't PM me asking for help, I will just redirect you to the appropriate forum, where there are others who are far more skilled than me.
I use helper static methods that automatically generate the string ID for registering. Personally, I use a StringID interface and @ClassID annotation because it's more human-readable, but Block/Item#getUnlocalizedName().substring(5) and Class#getSimpleName() work just as well. Having string IDs be part of the class or object itself allow it to be referenced from other classes.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumHello.
This is a tutorial to give people some useful "bits" (or shortcuts) for coding mods.
If you want anything to be included, please ask in the comments, and i will work to find something for it.
I will update this page as i find more bits.
Bits are here
Stay tuned for more!
...
Do you understand what static does?
Please don't PM me asking for help, I will just redirect you to the appropriate forum, where there are others who are far more skilled than me.
This is not the signature you are looking for.
Banners and such things
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumIf my knowledge is correct:
Static is a modifier that makes a method or variable able to accessed in a static context, or through different classes.
This can be used for initializing methods.
Why, is there something about it I don't understand?
...
Just checking you knew, many people use static without understanding what it does. Your register method is an identical reimplementation of GameRegistry.registerItem(), except that it's private, why?.
Please don't PM me asking for help, I will just redirect you to the appropriate forum, where there are others who are far more skilled than me.
This is not the signature you are looking for.
Banners and such things
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumits honestly just quicker to type, when all the things you're registering is in the same class...
I was at first trying to put the
in the same method, but I couldn't figure out how, So i don't really know...
In short: It was going to be easier, but i couldn't figure that bit out.
...
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumWell, i think I've made it better...
I didn't actually notice i did that. wow.
...
I use helper static methods that automatically generate the string ID for registering. Personally, I use a StringID interface and @ClassID annotation because it's more human-readable, but Block/Item#getUnlocalizedName().substring(5) and Class#getSimpleName() work just as well. Having string IDs be part of the class or object itself allow it to be referenced from other classes.
Putting the CENDENT back in transcendent!