Record Class PlayerSkin
java.lang.Object
java.lang.Record
net.minecraft.world.entity.player.PlayerSkin
public record PlayerSkin(ClientAsset.Texture body, @Nullable ClientAsset.Texture cape, @Nullable ClientAsset.Texture elytra, PlayerModelType model, boolean secure)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientAsset.TextureThe field for thebodyrecord component.private final @Nullable ClientAsset.TextureThe field for thecaperecord component.private final @Nullable ClientAsset.TextureThe field for theelytrarecord component.private final PlayerModelTypeThe field for themodelrecord component.private final booleanThe field for thesecurerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPlayerSkin(ClientAsset.Texture body, @Nullable ClientAsset.Texture cape, @Nullable ClientAsset.Texture elytra, PlayerModelType model, boolean secure) Creates an instance of aPlayerSkinrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbody()Returns the value of thebodyrecord component.@Nullable ClientAsset.Texturecape()Returns the value of thecaperecord component.@Nullable ClientAsset.Textureelytra()Returns the value of theelytrarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static PlayerSkininsecure(ClientAsset.Texture body, @Nullable ClientAsset.Texture cape, @Nullable ClientAsset.Texture elytra, PlayerModelType model) model()Returns the value of themodelrecord component.booleansecure()Returns the value of thesecurerecord component.final StringtoString()Returns a string representation of this record class.with(PlayerSkin.Patch patch)
-
Field Details
-
body
The field for thebodyrecord component. -
cape
The field for thecaperecord component. -
elytra
The field for theelytrarecord component. -
model
The field for themodelrecord component. -
secure
private final boolean secureThe field for thesecurerecord component.
-
-
Constructor Details
-
PlayerSkin
public PlayerSkin(ClientAsset.Texture body, @Nullable ClientAsset.Texture cape, @Nullable ClientAsset.Texture elytra, PlayerModelType model, boolean secure) Creates an instance of aPlayerSkinrecord class.- Parameters:
body- the value for thebodyrecord componentcape- the value for thecaperecord componentelytra- the value for theelytrarecord componentmodel- the value for themodelrecord componentsecure- the value for thesecurerecord component
-
-
Method Details
-
insecure
public static PlayerSkin insecure(ClientAsset.Texture body, @Nullable ClientAsset.Texture cape, @Nullable ClientAsset.Texture elytra, PlayerModelType model) -
with
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
body
Returns the value of thebodyrecord component.- Returns:
- the value of the
bodyrecord component
-
cape
Returns the value of thecaperecord component.- Returns:
- the value of the
caperecord component
-
elytra
Returns the value of theelytrarecord component.- Returns:
- the value of the
elytrarecord component
-
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
secure
public boolean secure()Returns the value of thesecurerecord component.- Returns:
- the value of the
securerecord component
-