public class MultiplicativeDuration extends AbstractDuration
id
Constructor and Description |
---|
MultiplicativeDuration() |
Modifier and Type | Method and Description |
---|---|
net.minecraft.util.text.ITextComponent |
getDisplay()
Get the display TextComponent
|
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
|
double |
getMultiplier() |
void |
read(com.google.gson.Gson gson,
com.google.gson.JsonElement json)
Reads the duration from JSON
|
getId, getPriority
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 double getMultiplier()