public class ConstantDuration extends AbstractDuration
id
Constructor and Description |
---|
ConstantDuration() |
Modifier and Type | Method and Description |
---|---|
net.minecraft.util.text.ITextComponent |
getDisplay()
Get the display TextComponent
|
long |
getMilliseconds() |
long |
getMillisecondValue(net.minecraft.entity.player.ServerPlayerEntity player,
DayCareBox box,
long currentTime)
Calculates the value in milliseconds that will get ADDED to the timestamp when the end timestamp is calculated
|
int |
getPriority()
Gets the duration type's priority (higher priority = will be calculated first)
|
void |
read(com.google.gson.Gson gson,
com.google.gson.JsonElement json)
Reads the duration from JSON
|
getId
public int getPriority()
DayCareDuration
getPriority
in interface DayCareDuration
getPriority
in class AbstractDuration
public long getMillisecondValue(net.minecraft.entity.player.ServerPlayerEntity player, DayCareBox box, long currentTime)
DayCareDuration
player
- The player this is relevant tobox
- The box this is relevant to from the playercurrentTime
- The already calculated timepublic void read(com.google.gson.Gson gson, com.google.gson.JsonElement json)
DayCareDuration
gson
- The GSONjson
- The JSON elementpublic net.minecraft.util.text.ITextComponent getDisplay()
DayCareDuration
getDisplay
in interface DayCareDuration
getDisplay
in class AbstractDuration
public long getMilliseconds()