Posted February 21, 201510 yr I want to make a certain event happen after a certain amount of Minecraft days. But I'm not sure how I would go about doing this. Any help would be gratefully appreciated.
February 21, 201510 yr You will need a tick handler and you will want it to check the world.getWorldTime() value and check to see if it's the "when" you want your Thing to happen, and then Do It. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
February 21, 201510 yr Author You will need a tick handler and you will want it to check the world.getWorldTime() value and check to see if it's the "when" you want your Thing to happen, and then Do It. Doesn't world.getWorldTime() just return the time of day?
February 21, 201510 yr Nope. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
February 21, 201510 yr Doesn't world.getWorldTime() just return the time of day? Yes. Use getTotalWorldTime() instead. Except that, as far as I can tell, getWorldTime() is not actually restricted to 0-23999. It doesn't tick when doDayNightCycle is false, but nothing modulos it back below 24000. getWorldTime() also respects sleeping in beds whereas getTotalWorldTime does not. Check WorldServer.java lines 185 and 159. So yes, in this situation getWorldTime() is in fact the better call. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
February 21, 201510 yr True enough, it is. The question then is: "Is this something that should happen after the game has been played for X hours?" or "Is this something that should occur after a certain amount of game time?" The former would use getTotalWorldTime() - doesn't care what time of day it is, only how long since the world was created, effectively measured in Real Time The latter would use getWorldTime() - it respects sleeping and the reset of the game clock Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
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.