Loot Tables with Time Check condition

Started by Mariano Argüello on

Topic category: Help with modding (Java Edition)

Last seen on 14:48, 19. Apr 2024
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Loot Tables with Time Check condition

My idea is simple: I wanna make a loot table that spawns X item when is daytime and Y item if its Nighttime. Very simple, the thing is i don't know how to use the "time_check" condition in the loot table properties, i am doing that with custom code over the json table as adding conditions like this is not possible without editing the file, but i want this to work everyday not just the first day of the world (i think that's gonna happen if i set the time from 0 to 12000 for detecting day and from 12000 to 0 for detecting night. Anyone knows how to do that? That would be great. Thanks in advice!

Last seen on 17:59, 7. Jan 2024
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
From here   time_check…
Tue, 11/01/2022 - 19:28

From here

 

  • time_check—Compares the current day time (or rather, 24000 * day count + day time) against given values. Invokable from any context.
    •  value: The time to compare the day time against.
    •  value: Shorthand version of  value above, used to check for a single value only. Number providers cannot be used in this shorthand form.
    •  period: If present, the day time is first reduced modulo the given number before being checked against  value. For example, setting this to 24000 causes the checked time to be equal to the current daytime.
Last seen on 14:48, 19. Apr 2024
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks i already found the…
Tue, 11/01/2022 - 20:43

Thanks i already found the answer i needed looking on the Minecraft Wiki. I don't know how to remove this post