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
ConstructorsConstructorDescriptionTemperatureStatusSelectorImpl(@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 aTemperatureStatusSelectorImplrecord class. -
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.@NotNull net.minecraft.core.HolderSet<net.minecraft.world.entity.EntityType<?>> Returns the value of theentityTypesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Optional<net.minecraft.world.level.storage.loot.predicates.LootItemCondition> Returns the value of thepredicaterecord component.net.minecraft.advancements.criterion.MinMaxBounds.DoublesReturns the value of thetemperatureScaleRangerecord component.final StringtoString()Returns a string representation of this record class.
-
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 aTemperatureStatusSelectorImplrecord class.- Parameters:
entityTypes- the value for theentityTypesrecord componenttemperatureScaleRange- the value for thetemperatureScaleRangerecord componentpredicate- the value for thepredicaterecord component
-
-
Method Details
-
appliesToEntityType
public boolean appliesToEntityType(net.minecraft.core.Holder<net.minecraft.world.entity.EntityType<?>> typeHolder) Description copied from interface:TemperatureStatusSelectorChecks if this selector applies to the given entity type holder.- Specified by:
appliesToEntityTypein interfaceTemperatureStatusSelector- Parameters:
typeHolder- The entity type holder to check.- Returns:
- Returns
trueif eitherTemperatureStatusSelector.entityTypes()is empty, or if it is not empty and contains the giventypeHolder.
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
entityTypes
@NotNull public @NotNull net.minecraft.core.HolderSet<net.minecraft.world.entity.EntityType<?>> entityTypes()Returns the value of theentityTypesrecord component.- Specified by:
entityTypesin interfaceTemperatureStatusSelector- Returns:
- the value of the
entityTypesrecord component
-
temperatureScaleRange
@NotNull public net.minecraft.advancements.criterion.MinMaxBounds.Doubles temperatureScaleRange()Returns the value of thetemperatureScaleRangerecord component.- Specified by:
temperatureScaleRangein interfaceTemperatureStatusSelector- Returns:
- the value of the
temperatureScaleRangerecord component
-
predicate
@NotNull public @NotNull Optional<net.minecraft.world.level.storage.loot.predicates.LootItemCondition> predicate()Returns the value of thepredicaterecord component.- Specified by:
predicatein interfaceTemperatureStatusSelector- Returns:
- the value of the
predicaterecord component
-