Filled REALTIME day/night

Discussion in 'Archived: Plugin Requests' started by kamakarzy, Apr 22, 2013.

  1. Offline

    kamakarzy

    Plugin category: Not sure

    Suggested name: Realtime but developers choice

    What I want: I really want a plugin that reads the hosts time on there computer and makes the minecraft world that time so if the host time is say 12:45pm then it will be daytime on the server and if command /time is done it will say 12:45 however if it is 12:45am it would be night

    Ideas for commands: No commands needed for this plugin.

    Ideas for permissions: None needed

    When I'd like it by: no rush
     
  2. Offline

    timtower Administrator Administrator Moderator

  3. Offline

    kamakarzy

    thanks you my search function musted of missed that as i did do a search befor request

    it didnt work its outdated as its for CB 1.0.1 im on 1.5.1-R0.2

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
    timtower likes this.
  4. Offline

    timtower Administrator Administrator Moderator

  5. Offline

    kamakarzy

    2013-04-22 14:10:35 [SEVERE] Could not load 'plugins\RealTime.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: org/bukkit/util/config/Configuration
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:184)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230)
    at org.bukkit.craftbukkit.v1_5_R2.CraftServer.loadPlugins(CraftServer.java:239)
    at org.bukkit.craftbukkit.v1_5_R2.CraftServer.<init>(CraftServer.java:217)
    at net.minecraft.server.v1_5_R2.PlayerList.<init>(PlayerList.java:55)
    at net.minecraft.server.v1_5_R2.DedicatedPlayerList.<init>(SourceFile:11)
    at net.minecraft.server.v1_5_R2.DedicatedServer.init(DedicatedServer.java:105)
    at net.minecraft.server.v1_5_R2.MinecraftServer.run(MinecraftServer.java:381)
    at net.minecraft.server.v1_5_R2.ThreadServerApplication.run(SourceFile:573)
    Caused by: java.lang.NoClassDefFoundError: org/bukkit/util/config/Configuration
    at me.mephestrial.realtime.RealTime.<clinit>(RealTime.java:299)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:173)
    ... 9 more
    Caused by: java.lang.ClassNotFoundException: org.bukkit.util.config.Configuration
    at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader.java:70)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:53)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 13 more
     
  6. Offline

    MysteryManX

    It's far too outdated, it's on CB 1.0.1
     
  7. Offline

    timtower Administrator Administrator Moderator

    MysteryManX Some plugins still work without updates
    kamakarzy Testing a small plugin I made for you ( Messed up the calculations will try to fix it )
     
  8. Offline

    kamakarzy

    thank you ever so much
     
  9. Offline

    timtower Administrator Administrator Moderator

  10. Offline

    kamakarzy

    ill let you know

    all its done is speed up time mate im going through day and night cycles in about 3 muinits

    20:51:16 [info] The current time in world is 13:21
    20:51:18 [info] The current time in world is 13:24
    20:51:23 [info] The current time in world is 13:29
    20:51:30 [info] The current time in world is 13:19

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
  11. Offline

    timtower Administrator Administrator Moderator

    kamakarzy The calculation is the hard part, if you give me that then I will be happy to implement that
     
  12. Offline

    kamakarzy

    the calculation between clicks and seconds, mins and hours. or give me the sum and ill work out answer :) good at maths just not java lol
     
  13. Offline

    timtower Administrator Administrator Moderator

    kamakarzy If you give me the calculation I will put it into the plugin, you just need to provide an calculation with variables like :
    Code:
    a = hours
    b = minutes
    c = a*60 + b
     
  14. Offline

    YoshiGenius

    There should be 20 server ticks per second, multiplying that with 3600, you get 72,000 ticks per hour, then multiply that by 24 to get the ticks per real day. You get 1,728,000 ticks. A minecraft day/night cycle is 24000 ticks. However, you will need to access the Date object every tick or so and calculate the time in ticks (checking for the actual TPS) and set the world's time to that in a ratio of 72:1 (real ticks:minecraft ticks). I hope you now understand why no-one does this.
     
  15. Offline

    kamakarzy

    what doea the calculation need to provide because if its time itself
    Code:
    minecraft in day game lasts 24000 ticks exactly 20 minutes so you would need to make a minuite 1200 ticks
     
    eg first calculation 24000 / 20 = 1200
    1200 * 60 = 72000 what would make 1 hour be 72000 ticks per hour
    second calculation would be 72000 * 24 = 1728000
     
    a = hours
    b = minutes
    c = days
    d = months
    e = years
     
    c /24 = a
    b * 60 = a
    a / 60 = b
    a * 24 = c
    e/12 = d
    c * 365 = e
    d*12 = e
    but it may just be better if there was a time read from server then it sets the time in realtime from the cmd prompt tell me if im wrong because i also know it may cause lagg with the constont updating
     
  16. Offline

    YoshiGenius

    I would just schedule a task that repeats and make it run every 72 ticks, and set the time to 1 tick later than when it was last run...
     
  17. Offline

    timtower Administrator Administrator Moderator

    kamakarzy I know it will lag that is why it is run every 15 seconds. and for the calculation :
    I have the hours and minutes of the server itself and need to convert that to server ticks.
    YoshiGenius That wouldn't synchronize with the server time, nice idea though if you want slower times
     
  18. Offline

    Scyntrus

    Thing is, even though the server can set world time every tick, clientside time will keep going normally, but will change every time they get the message from the server. Long story short, you'll see the sun shaking.
     
  19. Offline

    timtower Administrator Administrator Moderator

  20. Offline

    kamakarzy

    its 1200 server ticks per minutes & 72000 ticks per hour mate and thanks again for helping you didnt have too
     
  21. Offline

    timtower Administrator Administrator Moderator

    kamakarzy And the server time to minecraft time?
     
  22. Offline

    kamakarzy

    @timtiwer isnt that what i just gave you the server doesnt run in time it runs in ticks
     
  23. Offline

    timtower Administrator Administrator Moderator

    kamakarzy I need to convert the real time to minecraft ticks, I need that calculation, you just gave me the things I already knew
     
  24. Offline

    kamakarzy

    timtower oh so like

    0.27 ticks = 1 second minecraft time
    20 ticks = 1 second real time
    16.6 ticks = 1 min minecraft time
    1200 ticks = 1 min real time
    1000 ticks = 1 hour minecraft time
    72000 ticks = 1 hour real time
     
  25. Offline

    timtower Administrator Administrator Moderator

    kamakarzy And now so I can input the real time hours / minutes and I get the minecraft ticks
     
  26. Offline

    kamakarzy

    timtower

    a) hours = 72000/ 72 = minecraft ticks
    b) minutes = 1000/72 = minecraft ticks
    c) seconds = 20/72 = minecraft ticks

    ??? for example if you did 10 hours it would be 10 * 72000 = 720000/72 = 100000
     
  27. Offline

    timtower Administrator Administrator Moderator

    Ty, then it will be like :
    totalminutes*1000/72=newtime
     
  28. Offline

    kamakarzy

    yes but would it read the real time in minutes only?
     
  29. Offline

    timtower Administrator Administrator Moderator

    Last edited by a moderator: Jun 1, 2016
  30. Offline

    kamakarzy

    timtower thanks ill give it a test now

    so what time does it read exactly because as of right now it is 10:16 real time for me and on game 8:34 minecraft time but the mins are going up in mins so it looking good just dont think its reading server time correctly

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016

Share This Page