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 boolean
The field for theflying
record component.private final float
The field for theflyingSpeed
record component.private final boolean
The field for theinstabuild
record component.private final boolean
The field for theinvulnerable
record component.private final boolean
The field for themayBuild
record component.private final boolean
The field for themayFly
record component.private final float
The field for thewalkingSpeed
record component. -
Constructor Summary
ConstructorsConstructorDescriptionPacked
(boolean invulnerable, boolean flying, boolean mayFly, boolean instabuild, boolean mayBuild, float flyingSpeed, float walkingSpeed) Creates an instance of aPacked
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.boolean
flying()
Returns the value of theflying
record component.float
Returns the value of theflyingSpeed
record component.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theinstabuild
record component.boolean
Returns the value of theinvulnerable
record component.boolean
mayBuild()
Returns the value of themayBuild
record component.boolean
mayFly()
Returns the value of themayFly
record component.final String
toString()
Returns a string representation of this record class.float
Returns the value of thewalkingSpeed
record component.
-
Field Details
-
invulnerable
private final boolean invulnerableThe field for theinvulnerable
record component. -
flying
private final boolean flyingThe field for theflying
record component. -
mayFly
private final boolean mayFlyThe field for themayFly
record component. -
instabuild
private final boolean instabuildThe field for theinstabuild
record component. -
mayBuild
private final boolean mayBuildThe field for themayBuild
record component. -
flyingSpeed
private final float flyingSpeedThe field for theflyingSpeed
record component. -
walkingSpeed
private final float walkingSpeedThe field for thewalkingSpeed
record 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 aPacked
record class.- Parameters:
invulnerable
- the value for theinvulnerable
record componentflying
- the value for theflying
record componentmayFly
- the value for themayFly
record componentinstabuild
- the value for theinstabuild
record componentmayBuild
- the value for themayBuild
record componentflyingSpeed
- the value for theflyingSpeed
record componentwalkingSpeed
- the value for thewalkingSpeed
record 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 theinvulnerable
record component.- Returns:
- the value of the
invulnerable
record component
-
flying
public boolean flying()Returns the value of theflying
record component.- Returns:
- the value of the
flying
record component
-
mayFly
public boolean mayFly()Returns the value of themayFly
record component.- Returns:
- the value of the
mayFly
record component
-
instabuild
public boolean instabuild()Returns the value of theinstabuild
record component.- Returns:
- the value of the
instabuild
record component
-
mayBuild
public boolean mayBuild()Returns the value of themayBuild
record component.- Returns:
- the value of the
mayBuild
record component
-
flyingSpeed
public float flyingSpeed()Returns the value of theflyingSpeed
record component.- Returns:
- the value of the
flyingSpeed
record component
-
walkingSpeed
public float walkingSpeed()Returns the value of thewalkingSpeed
record component.- Returns:
- the value of the
walkingSpeed
record component
-