Package de.teamlapen.werewolves.effects
Record Class WerewolfWeakeningEffect.Modifier
java.lang.Object
java.lang.Record
de.teamlapen.werewolves.effects.WerewolfWeakeningEffect.Modifier
- Enclosing class:
WerewolfWeakeningEffect
protected static record WerewolfWeakeningEffect.Modifier(net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> attribute, net.minecraft.resources.ResourceLocation id, float maxModifier, int startingAmplifier)
extends Record
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedModifier(net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> attribute, net.minecraft.resources.ResourceLocation id, float maxModifier, int startingAmplifier) Creates an instance of aModifierrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> Returns the value of theattributerecord component.createModifier(int level, int maxLevel) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationid()Returns the value of theidrecord component.floatReturns the value of themaxModifierrecord component.intReturns the value of thestartingAmplifierrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Modifier
protected Modifier(net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> attribute, net.minecraft.resources.ResourceLocation id, float maxModifier, int startingAmplifier) Creates an instance of aModifierrecord class.- Parameters:
attribute- the value for theattributerecord componentid- the value for theidrecord componentmaxModifier- the value for themaxModifierrecord componentstartingAmplifier- the value for thestartingAmplifierrecord component
-
-
Method Details
-
createModifier
-
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 '=='. -
attribute
public net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> attribute()Returns the value of theattributerecord component.- Returns:
- the value of the
attributerecord component
-
id
public net.minecraft.resources.ResourceLocation id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
maxModifier
public float maxModifier()Returns the value of themaxModifierrecord component.- Returns:
- the value of the
maxModifierrecord component
-
startingAmplifier
public int startingAmplifier()Returns the value of thestartingAmplifierrecord component.- Returns:
- the value of the
startingAmplifierrecord component
-