Class TemperatureStatusSelector.Builder
java.lang.Object
com.github.thedeathlycow.thermoo.api.temperature.status.v2.TemperatureStatusSelector.Builder
- Enclosing interface:
TemperatureStatusSelector
Builder for selectors. Primarily intended to be used for data generation.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Produces a new selector from this builder.temperatureIsAtLeast(double value) Sets thetemperature rangeto only affect entities with a temperature scale is at least thevalue(inclusive).temperatureIsAtMost(double value) Sets thetemperature rangeto only affect entities with a temperature scale is at most thevalue(inclusive).temperatureIsBetween(double min, double max) Sets thetemperature rangeto only affect entities with a temperature scale that is betweenminandmax(both are inclusive).temperatureIsExactly(double value) Sets thetemperature rangeto only affect entities with a temperature scale that exactly matches thevalue.withCondition(net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder predicateBuilder) Updates the predicate of the builder.
-
Method Details
-
withCondition
public TemperatureStatusSelector.Builder withCondition(net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder predicateBuilder) Updates the predicate of the builder.- Returns:
- Returns this builder.
- Throws:
NullPointerException- if thepredicateBuilderisnull.
-
temperatureIsExactly
Sets thetemperature rangeto only affect entities with a temperature scale that exactly matches thevalue.- Parameters:
value- A finite double.- Returns:
- Returns this builder.
- Throws:
IllegalArgumentException- if thevalueis infinite or NaN.
-
temperatureIsBetween
Sets thetemperature rangeto only affect entities with a temperature scale that is betweenminandmax(both are inclusive).- Parameters:
min- A finite double.max- A finite double.- Returns:
- Returns this builder.
- Throws:
IllegalArgumentException- if eitherminormaxare infinite or NaN.
-
temperatureIsAtLeast
Sets thetemperature rangeto only affect entities with a temperature scale is at least thevalue(inclusive).- Parameters:
value- A finite double.- Returns:
- Returns this builder.
- Throws:
IllegalArgumentException- if thevalueis infinite or NaN.
-
temperatureIsAtMost
Sets thetemperature rangeto only affect entities with a temperature scale is at most thevalue(inclusive).- Parameters:
value- A finite double.- Returns:
- Returns this builder.
- Throws:
IllegalArgumentException- if thevalueis infinite or NaN.
-
build
Produces a new selector from this builder.
-