Interface TemperatureStatus
- All Known Implementing Classes:
TemperatureStatusImpl
@NonExtendable
public interface TemperatureStatus
A temperature status periodically applies effects to a specified set
of living entities.
API users should not implement this interface.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classBuilder for temperature statuses. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<net.minecraft.core.Holder<TemperatureStatus>> Codec for temperature status holders.static final com.mojang.serialization.Codec<TemperatureStatus> Codec for the temperature status object. -
Method Summary
Modifier and TypeMethodDescriptionstatic TemperatureStatus.Builderbuilder(TemperatureStatusSelector.Builder selectorBuilder) Creates a temperature status builder.effects()A list of the effects that are applied periodically to affected entities.booleanWhether this status is enabled by default.@Range(from=1L,to=2147483647L) intinterval()The interval, in ticks, in which the status will attempt to apply itseffects().Creates a selector builder that applies to all entity types.selector()Used to select the entities that are affected by this status.selector(net.minecraft.core.HolderSet<net.minecraft.world.entity.EntityType<?>> entityTypes) Creates a selector builder that applies to all entity types in the specified holder set.
-
Field Details
-
DIRECT_CODEC
Codec for the temperature status object. -
CODEC
Codec for temperature status holders.
-
-
Method Details
-
selector
static TemperatureStatusSelector.Builder selector(net.minecraft.core.HolderSet<net.minecraft.world.entity.EntityType<?>> entityTypes) Creates a selector builder that applies to all entity types in the specified holder set. Primarily intended to be used for data generation. -
selectAllEntities
Creates a selector builder that applies to all entity types. Primarily intended to be used for data generation. -
builder
Creates a temperature status builder. Primarily intended to be used for data generation.- Parameters:
selectorBuilder- The selector for the status- See Also:
-
selector
TemperatureStatusSelector selector()Used to select the entities that are affected by this status. -
interval
@Range(from=1L,to=2147483647L) int interval()The interval, in ticks, in which the status will attempt to apply itseffects(). The default interval is 20.- Returns:
- Returns an int between
1and 2147483647.
-
enabledByDefault
boolean enabledByDefault()Whether this status is enabled by default.- Returns:
- Returns
trueby default.
-
effects
List<TemperatureEffect> effects()A list of the effects that are applied periodically to affected entities.
-