There isn't one in the block class, but if you're using Forge then you can use the Forge event "WorldEvent.Load" to get the start of each world/dimension or the fml SERVER_STARTING state message to get the start of a world/save - the word "world" can be a little ambiguous. With whichever one you're after, you can then do whatever you were wanting from your Block type. Just please remember than each Block instance is just a reference for the rest of the code - the in-game blocks are stored as numbers (indexes in the Block array)... you've only got one instance per block type.
Rollback Post to RevisionRollBack
If I said I'd do something and haven't, please remind me; I didn't lie, I just forgot.
I program
Is there a function that will be called that i can put in a block class that will be called when the world is first loaded?
thanks!
There isn't one in the block class, but if you're using Forge then you can use the Forge event "WorldEvent.Load" to get the start of each world/dimension or the fml SERVER_STARTING state message to get the start of a world/save - the word "world" can be a little ambiguous. With whichever one you're after, you can then do whatever you were wanting from your Block type. Just please remember than each Block instance is just a reference for the rest of the code - the in-game blocks are stored as numbers (indexes in the Block array)... you've only got one instance per block type.
I program