Class SequenceTemperatureEffect
java.lang.Object
com.github.thedeathlycow.thermoo.api.temperature.effects.TemperatureEffect<SequenceTemperatureEffect.Config>
com.github.thedeathlycow.thermoo.api.temperature.effects.SequenceTemperatureEffect
public final class SequenceTemperatureEffect
extends TemperatureEffect<SequenceTemperatureEffect.Config>
Applies multiple child temperature effects at once. Useful for when you want to apply several different temperature
effects under the same base set of conditions, without the overhead of checking those conditions multiple times.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SequenceTemperatureEffect.Config> -
Constructor Summary
ConstructorsConstructorDescriptionSequenceTemperatureEffect(com.mojang.serialization.Codec<SequenceTemperatureEffect.Config> configCodec) -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(net.minecraft.world.entity.LivingEntity victim, net.minecraft.server.level.ServerLevel serverLevel, SequenceTemperatureEffect.Config config) Applies the effect to a living entitybooleanshouldApply(net.minecraft.world.entity.LivingEntity victim, SequenceTemperatureEffect.Config config) Tests if the effect should be applied to a living entity.Methods inherited from class com.github.thedeathlycow.thermoo.api.temperature.effects.TemperatureEffect
getCodec, remove
-
Field Details
-
CODEC
-
-
Constructor Details
-
SequenceTemperatureEffect
public SequenceTemperatureEffect(com.mojang.serialization.Codec<SequenceTemperatureEffect.Config> configCodec)
-
-
Method Details
-
apply
public void apply(net.minecraft.world.entity.LivingEntity victim, net.minecraft.server.level.ServerLevel serverLevel, SequenceTemperatureEffect.Config config) Description copied from class:TemperatureEffectApplies the effect to a living entity- Specified by:
applyin classTemperatureEffect<SequenceTemperatureEffect.Config>- Parameters:
victim- The living entity to apply the effect toserverLevel- The server level of the victimconfig- The effect config
-
shouldApply
public boolean shouldApply(net.minecraft.world.entity.LivingEntity victim, SequenceTemperatureEffect.Config config) Description copied from class:TemperatureEffectTests if the effect should be applied to a living entity. Note that even if this returnstrue, the effect is not guaranteed to be applied. This is because all entity must pass the predicate specified byConfiguredTemperatureEffect.predicate().- Specified by:
shouldApplyin classTemperatureEffect<SequenceTemperatureEffect.Config>- Parameters:
victim- The victim to test if the effect should be applied toconfig- The effect config- Returns:
- Returns if the effect should be applied to the victim
-