Record Class StatusEffectTemperatureEffect.Config.ConfigEffect
java.lang.Object
java.lang.Record
com.github.thedeathlycow.thermoo.api.temperature.effects.StatusEffectTemperatureEffect.Config.ConfigEffect
- Enclosing class:
StatusEffectTemperatureEffect.Config
protected static record StatusEffectTemperatureEffect.Config.ConfigEffect(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> type, int duration, int amplifier)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<StatusEffectTemperatureEffect.Config.ConfigEffect> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConfigEffect(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> type, int duration, int amplifier) Creates an instance of aConfigEffectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theamplifierrecord component.intduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> type()Returns the value of thetyperecord component.
-
Field Details
-
CODEC
public static final com.mojang.serialization.Codec<StatusEffectTemperatureEffect.Config.ConfigEffect> CODEC
-
-
Constructor Details
-
ConfigEffect
protected ConfigEffect(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> type, int duration, int amplifier) Creates an instance of aConfigEffectrecord class.- Parameters:
type- the value for thetyperecord componentduration- the value for thedurationrecord componentamplifier- the value for theamplifierrecord component
-
-
Method Details
-
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. -
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. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
type
public net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
duration
public int duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
amplifier
public int amplifier()Returns the value of theamplifierrecord component.- Returns:
- the value of the
amplifierrecord component
-