Posted June 2, 201213 yr maybe a nub question but how would i change the tick update of a tileEntity. change it so my TileEntitiy only does an update every 20 - 60 ticks rather than every tick. Also without doing a counter than simply delays the update til the tick time has passed. http://i577.photobucket.com/albums/ss215/bobstrong/ModBannerMed.png[/img]
June 2, 201213 yr Create a variable called ticks. Now in the update function make it so then the tick variable adds one. After that check if the amount of ticks is divisible by 20. With that you can check your tile entity every second. if(ticks % 20){ ...} http://calclavia.com/uploads/banner.png[/img]
June 2, 201213 yr Author ty but, that is the same as counting the ticks on each update. I'm looking to see if there is another way that simply tells minecraft not even to think of updating the tileEntity til x time has passed. I'm trying to get it so the entire tileEntity will not update a single part of itself time x time has passed. counting ticks would cause an if statement in almost every part of my code to insure it everything is timed. http://i577.photobucket.com/albums/ss215/bobstrong/ModBannerMed.png[/img]
June 2, 201213 yr ty but, that is the same as counting the ticks on each update. I'm looking to see if there is another way that simply tells minecraft not even to think of updating the tileEntity til x time has passed. I'm trying to get it so the entire tileEntity will not update a single part of itself time x time has passed. counting ticks would cause an if statement in almost every part of my code to insure it everything is timed. No such way, you either always tick, or never tick.
June 2, 201213 yr ty but, that is the same as counting the ticks on each update. I'm looking to see if there is another way that simply tells minecraft not even to think of updating the tileEntity til x time has passed. I'm trying to get it so the entire tileEntity will not update a single part of itself time x time has passed. counting ticks would cause an if statement in almost every part of my code to insure it everything is timed. Why do you have to do this? Won't using that if-statement solve the problem? http://calclavia.com/uploads/banner.png[/img]
June 2, 201213 yr Author ty but, that is the same as counting the ticks on each update. I'm looking to see if there is another way that simply tells minecraft not even to think of updating the tileEntity til x time has passed. I'm trying to get it so the entire tileEntity will not update a single part of itself time x time has passed. counting ticks would cause an if statement in almost every part of my code to insure it everything is timed. Why do you have to do this? Won't using that if-statement solve the problem? Yes it will just looking for a better way to improve preformance of the tileEntity http://i577.photobucket.com/albums/ss215/bobstrong/ModBannerMed.png[/img]
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.