Record Class TemperatureStatusSelectorImpl

java.lang.Object
java.lang.Record
com.github.thedeathlycow.thermoo.impl.temperature.status.TemperatureStatusSelectorImpl
All Implemented Interfaces:
TemperatureStatusSelector

public record TemperatureStatusSelectorImpl(@NotNull net.minecraft.core.HolderSet<net.minecraft.world.entity.EntityType<?>> entityTypes, net.minecraft.advancements.criterion.MinMaxBounds.Doubles temperatureScaleRange, @NotNull Optional<net.minecraft.world.level.storage.loot.predicates.LootItemCondition> predicate) extends Record implements TemperatureStatusSelector
  • Nested Class Summary

    Nested classes/interfaces inherited from interface TemperatureStatusSelector

    TemperatureStatusSelector.Builder
  • Field Summary

    Fields inherited from interface TemperatureStatusSelector

    CODEC
  • Constructor Summary

    Constructors
    Constructor
    Description
    TemperatureStatusSelectorImpl(@NotNull net.minecraft.core.HolderSet<net.minecraft.world.entity.EntityType<?>> entityTypes, net.minecraft.advancements.criterion.MinMaxBounds.Doubles temperatureScaleRange, @NotNull Optional<net.minecraft.world.level.storage.loot.predicates.LootItemCondition> predicate)
    Creates an instance of a TemperatureStatusSelectorImpl record class.
  • 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.
    @NotNull net.minecraft.core.HolderSet<net.minecraft.world.entity.EntityType<?>>
    Returns the value of the entityTypes record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    @NotNull Optional<net.minecraft.world.level.storage.loot.predicates.LootItemCondition>
    Returns the value of the predicate record component.
    net.minecraft.advancements.criterion.MinMaxBounds.Doubles
    Returns the value of the temperatureScaleRange record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • TemperatureStatusSelectorImpl

      public TemperatureStatusSelectorImpl(@NotNull @NotNull net.minecraft.core.HolderSet<net.minecraft.world.entity.EntityType<?>> entityTypes, @NotNull net.minecraft.advancements.criterion.MinMaxBounds.Doubles temperatureScaleRange, @NotNull @NotNull Optional<net.minecraft.world.level.storage.loot.predicates.LootItemCondition> predicate)
      Creates an instance of a TemperatureStatusSelectorImpl record class.
      Parameters:
      entityTypes - the value for the entityTypes record component
      temperatureScaleRange - the value for the temperatureScaleRange record component
      predicate - the value for the predicate record component
  • Method Details

    • appliesToEntityType

      public boolean appliesToEntityType(net.minecraft.core.Holder<net.minecraft.world.entity.EntityType<?>> typeHolder)
      Description copied from interface: TemperatureStatusSelector
      Checks if this selector applies to the given entity type holder.
      Specified by:
      appliesToEntityType in interface TemperatureStatusSelector
      Parameters:
      typeHolder - The entity type holder to check.
      Returns:
      Returns true if either TemperatureStatusSelector.entityTypes() is empty, or if it is not empty and contains the given typeHolder.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • entityTypes

      @NotNull public @NotNull net.minecraft.core.HolderSet<net.minecraft.world.entity.EntityType<?>> entityTypes()
      Returns the value of the entityTypes record component.
      Specified by:
      entityTypes in interface TemperatureStatusSelector
      Returns:
      the value of the entityTypes record component
    • temperatureScaleRange

      @NotNull public net.minecraft.advancements.criterion.MinMaxBounds.Doubles temperatureScaleRange()
      Returns the value of the temperatureScaleRange record component.
      Specified by:
      temperatureScaleRange in interface TemperatureStatusSelector
      Returns:
      the value of the temperatureScaleRange record component
    • predicate

      @NotNull public @NotNull Optional<net.minecraft.world.level.storage.loot.predicates.LootItemCondition> predicate()
      Returns the value of the predicate record component.
      Specified by:
      predicate in interface TemperatureStatusSelector
      Returns:
      the value of the predicate record component