Interface TemperatureStatusSelector
- All Known Implementing Classes:
TemperatureStatusSelectorImpl
@NonExtendable
public interface TemperatureStatusSelector
Provides the data for selecting entities in a
TemperatureStatus.
API users should not implement this interface.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classBuilder for selectors. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<TemperatureStatusSelector> The codec for the selector object. -
Method Summary
Modifier and TypeMethodDescriptionbooleanappliesToEntityType(net.minecraft.core.Holder<net.minecraft.world.entity.EntityType<?>> typeHolder) Checks if this selector applies to the given entity type holder.net.minecraft.core.HolderSet<net.minecraft.world.entity.EntityType<?>> Ensures the status will only ever be checked for the given set of entity types.Optional<net.minecraft.world.level.storage.loot.predicates.LootItemCondition> Dynamically evaluates this predicate when attempting to apply the status.net.minecraft.advancements.criterion.MinMaxBounds.DoublesDynamically evaluates the current temperature scale of an entity to ensure it is in this inclusive range when attempting to apply the status.
-
Field Details
-
CODEC
The codec for the selector object.
-
-
Method Details
-
appliesToEntityType
boolean appliesToEntityType(net.minecraft.core.Holder<net.minecraft.world.entity.EntityType<?>> typeHolder) Checks if this selector applies to the given entity type holder.- Parameters:
typeHolder- The entity type holder to check.- Returns:
- Returns
trueif eitherentityTypes()is empty, or if it is not empty and contains the giventypeHolder.
-
entityTypes
net.minecraft.core.HolderSet<net.minecraft.world.entity.EntityType<?>> entityTypes()Ensures the status will only ever be checked for the given set of entity types. This is computed ahead of time, so it is much more performant than using predicates to check for entity types. -
temperatureScaleRange
net.minecraft.advancements.criterion.MinMaxBounds.Doubles temperatureScaleRange()Dynamically evaluates the current temperature scale of an entity to ensure it is in this inclusive range when attempting to apply the status. -
predicate
Optional<net.minecraft.world.level.storage.loot.predicates.LootItemCondition> predicate()Dynamically evaluates this predicate when attempting to apply the status.
-