Record Class Abilities.Packed
java.lang.Object
java.lang.Record
net.minecraft.world.entity.player.Abilities.Packed
- Enclosing class:
Abilities
public static record Abilities.Packed(boolean invulnerable, boolean flying, boolean mayFly, boolean instabuild, boolean mayBuild, float flyingSpeed, float walkingSpeed)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Abilities.Packed> private final booleanThe field for theflyingrecord component.private final floatThe field for theflyingSpeedrecord component.private final booleanThe field for theinstabuildrecord component.private final booleanThe field for theinvulnerablerecord component.private final booleanThe field for themayBuildrecord component.private final booleanThe field for themayFlyrecord component.private final floatThe field for thewalkingSpeedrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPacked(boolean invulnerable, boolean flying, boolean mayFly, boolean instabuild, boolean mayBuild, float flyingSpeed, float walkingSpeed) Creates an instance of aPackedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanflying()Returns the value of theflyingrecord component.floatReturns the value of theflyingSpeedrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theinstabuildrecord component.booleanReturns the value of theinvulnerablerecord component.booleanmayBuild()Returns the value of themayBuildrecord component.booleanmayFly()Returns the value of themayFlyrecord component.final StringtoString()Returns a string representation of this record class.floatReturns the value of thewalkingSpeedrecord component.
-
Field Details
-
invulnerable
private final boolean invulnerableThe field for theinvulnerablerecord component. -
flying
private final boolean flyingThe field for theflyingrecord component. -
mayFly
private final boolean mayFlyThe field for themayFlyrecord component. -
instabuild
private final boolean instabuildThe field for theinstabuildrecord component. -
mayBuild
private final boolean mayBuildThe field for themayBuildrecord component. -
flyingSpeed
private final float flyingSpeedThe field for theflyingSpeedrecord component. -
walkingSpeed
private final float walkingSpeedThe field for thewalkingSpeedrecord component. -
CODEC
-
-
Constructor Details
-
Packed
public Packed(boolean invulnerable, boolean flying, boolean mayFly, boolean instabuild, boolean mayBuild, float flyingSpeed, float walkingSpeed) Creates an instance of aPackedrecord class.- Parameters:
invulnerable- the value for theinvulnerablerecord componentflying- the value for theflyingrecord componentmayFly- the value for themayFlyrecord componentinstabuild- the value for theinstabuildrecord componentmayBuild- the value for themayBuildrecord componentflyingSpeed- the value for theflyingSpeedrecord componentwalkingSpeed- the value for thewalkingSpeedrecord 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. All components in this record class are compared with '=='. -
invulnerable
public boolean invulnerable()Returns the value of theinvulnerablerecord component.- Returns:
- the value of the
invulnerablerecord component
-
flying
public boolean flying()Returns the value of theflyingrecord component.- Returns:
- the value of the
flyingrecord component
-
mayFly
public boolean mayFly()Returns the value of themayFlyrecord component.- Returns:
- the value of the
mayFlyrecord component
-
instabuild
public boolean instabuild()Returns the value of theinstabuildrecord component.- Returns:
- the value of the
instabuildrecord component
-
mayBuild
public boolean mayBuild()Returns the value of themayBuildrecord component.- Returns:
- the value of the
mayBuildrecord component
-
flyingSpeed
public float flyingSpeed()Returns the value of theflyingSpeedrecord component.- Returns:
- the value of the
flyingSpeedrecord component
-
walkingSpeed
public float walkingSpeed()Returns the value of thewalkingSpeedrecord component.- Returns:
- the value of the
walkingSpeedrecord component
-