Class TemperatureStatus.Builder
java.lang.Object
com.github.thedeathlycow.thermoo.api.temperature.status.v2.TemperatureStatus.Builder
- Enclosing interface:
TemperatureStatus
Builder for temperature statuses. Primarily intended to be used for data generation.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaddEffect(TemperatureEffect effect) Adds an effect to this status.build()Produces a new status from this builder.Sets this status to be disabled by default.withInterval(int value) Sets the interval, in ticks, between applications of the effects of the status.
-
Method Details
-
withInterval
Sets the interval, in ticks, between applications of the effects of the status.- Parameters:
value- An int between1and 2147483647- Returns:
- Returns this builder.
- Throws:
IllegalArgumentException- if the value is less than 1
-
disabledByDefault
Sets this status to be disabled by default.- Returns:
- Returns this builder.
-
addEffect
Adds an effect to this status.- Parameters:
effect- The effect ot add.- Returns:
- Returns this builder.
- Throws:
NullPointerException- if the effect isnull
-
build
Produces a new status from this builder.
-