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 Classes
    Modifier and Type
    Interface
    Description
    static final class 
    Builder for selectors.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.MapCodec<TemperatureStatusSelector>
    The codec for the selector object.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    appliesToEntityType(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.Doubles
    Dynamically evaluates the current temperature scale of an entity to ensure it is in this inclusive range when attempting to apply the status.
  • Field Details

  • 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 true if either entityTypes() is empty, or if it is not empty and contains the given typeHolder.
    • 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.