Package de.teamlapen.werewolves.effects
Record Class WerewolfWeakeningEffect.Modifier
java.lang.Object
java.lang.Record
de.teamlapen.werewolves.effects.WerewolfWeakeningEffect.Modifier
- Enclosing class:
- WerewolfWeakeningEffect
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.entity.ai.attributes.AttributeReturns the value of theattributerecord component.net.minecraft.world.effect.AttributeModifierTemplatecreateModifier(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.floatReturns the value of themaxModifierrecord component.name()Returns the value of thenamerecord component.intReturns the value of thestartingAmplifierrecord component.final StringtoString()Returns a string representation of this record class.uuid()Returns the value of theuuidrecord component.
-
Constructor Details
-
Modifier
protected Modifier(net.minecraft.world.entity.ai.attributes.Attribute attribute, UUID uuid, String name, float maxModifier, int startingAmplifier) Creates an instance of aModifierrecord class.- Parameters:
attribute- the value for theattributerecord componentuuid- the value for theuuidrecord componentname- the value for thenamerecord componentmaxModifier- the value for themaxModifierrecord componentstartingAmplifier- the value for thestartingAmplifierrecord component
-
-
Method Details
-
createModifier
public net.minecraft.world.effect.AttributeModifierTemplate createModifier(int level, int maxLevel) -
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.world.entity.ai.attributes.Attribute attribute()Returns the value of theattributerecord component.- Returns:
- the value of the
attributerecord component
-
uuid
Returns the value of theuuidrecord component.- Returns:
- the value of the
uuidrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord 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
-