-
Notifications
You must be signed in to change notification settings - Fork 17
Time Requirement
Time Requirement is used to make the recipe work only in some times of the Minecraft day/night cycle.
The daytime that this requirement use is dependant to the dimension the machine is in. Here is some informations about day/night cycle in vanilla dimensions. For modded dimensions please ask to the mod author how they defined the day/night cycle in their custom dimensions.
Minecraft day/night cycle in Overworld is based in 24000 ticks, from 0 to 23999.
- 0 is sunrise
- 6000 is noon
- 12000 is sunset
- 18000 is midnight
The Nether and The End don't have day/night cycle and their day time is frozen to 12001 ticks.
This Requirement is an input only requirement, meaning that you don't have to define the "mode" property. It is used only to block or allow the usage of a recipe during certains times of the day/night cycle but don't have any real inputs or outputs.
To use this requirement you must provide a list of Time Comparators. A Time Comparator is a String defined by a prefix and the actual day/night time you want to compare.
The available prefix are these :
- ">>" Strictly higher
- ">=" Higher and equals
- "==" Equals
- "<=" Lower and equals
- "<<" Strictly lower
Example :
">>12000"
means the recipe will only run if the dimension daytime is higher than 12000 ticks, so between 12001 and 23999 included (only night).
"<=6000"
means the recipe will only run if the dimension daytime is lower or equals than 6000 ticks, so between 0 and 6000 included.
The Requirement type of Time Requirement is : "type": "custommachinery:time" Put this in the requirement json to define a Time Requirement.
Beside the "type" mandatory property the Time Requirement only have 1 other mandatory property and 1 optional property.
Description : An array of Time Comparators. Each comparators will be compared to the actual dimension daytime and if all are mached, the recipe will start.
Example : "times": [">=12000", "<<18000"]
The recipe will only start if the dimension daytime the machine is in is between 12000 and 17999 ticks included.
Description : A boolean, if false the requirement will not display in jei, if true it will display as a little green "+" below the recipe.
Default : true (The requirement will display)
Example : "jei": false
(The requirement will not display)
A Time Requirement that will make the recipe start only if the dimension daytime the machine is in is inferior to 12000 (daytime in overworld).
{
"type": "custommachinery:time",
"times": ["<<12000"]
}
3. Machine GUI
- Dump Element
- Energy Element
- Fluid Element
- Fuel Element
- Player Inventory Element
- Progress Bar Element
- Reset Element
- Slot Element
- Status Element
- Text Element
- Texture Element
5. Catalysts
- Biome Requirement
- Block Requirement
- Command Requirement
- Dimension Requirement
- Drop Requirement
- Durability Requirement
- Effect Requirement
- Energy Requirement
- Energy Per Tick Requirement
- Entity Requirement
- Fluid Requirement
- Fluid Per Tick Requirement
- Fuel Requirement
- Item Requirement
- Light Requirement
- Loot Table Requirement
- Position Requirement
- Structure Requirement
- Redstone Requirement
- Time Requirement
- Weather Requirement