I have one question about when this method is called, I'm looking for a method that is called every tick for the block. The name of the method suggests that it gets called every tick but the MCP comment the was generated confused me a bit.
tldr version; My question is really just is this method called every tick or must it be "scheduled" somehow? New question 2 posts down!
/**
* Ticks the block if it's been scheduled
*/
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) {}
I read up about how the Minecraft ticks work here. I want to be able to make my block be updated every 20 ticks/1 second NOT randomly. In the World class class there is this method, but I'm not sure how to call it as I don't what parameters I should give it.
public void scheduleBlockUpdate(int par1, int par2, int par3, int par4, int par5) {}
I want my block's tick to be updated every 20 ticks, Would I have to schedule it?
I'm fairly certain block ticks are always random unless triggered by an outside source. You might be better off with a TileEntity if you want regular updates.
tldr version;
My question is really just is this method called every tick or must it be "scheduled" somehow?New question 2 posts down!The method is in the Block class line 564
And then override this method to change the rate:
Lower tick rate means more frequent ticks.
I want my block's tick to be updated every 20 ticks, Would I have to schedule it?
Whenever it is pressed, it eventually calls something like this:
par2, par3, par4 are its location. BlockID is pretty self-explanatory, and this.tickRate returns 20 (a bit like your block) if the button is stone.