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 ClientAsset.TextureThe field for thecaperecord component.private final 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, ClientAsset.Texture cape, ClientAsset.Texture elytra, PlayerModelType model, boolean secure) Creates an instance of aPlayerSkinrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbody()Returns the value of thebodyrecord component.cape()Returns the value of thecaperecord component.elytra()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 pBody, ClientAsset.Texture pCape, ClientAsset.Texture pElytra, PlayerModelType pModel) 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 pPatch)
-
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 pBody, @Nullable ClientAsset.Texture pCape, @Nullable ClientAsset.Texture pElytra, PlayerModelType pModel) -
with
-
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 '=='. -
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
-