Record Class PlayerSkin.Patch
java.lang.Object
java.lang.Record
net.minecraft.world.entity.player.PlayerSkin.Patch
- Enclosing class:
PlayerSkin
public static record PlayerSkin.Patch(Optional<ClientAsset.ResourceTexture> body, Optional<ClientAsset.ResourceTexture> cape, Optional<ClientAsset.ResourceTexture> elytra, Optional<PlayerModelType> model)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Optional<ClientAsset.ResourceTexture> The field for thebodyrecord component.private final Optional<ClientAsset.ResourceTexture> The field for thecaperecord component.private final Optional<ClientAsset.ResourceTexture> The field for theelytrarecord component.static final PlayerSkin.Patchstatic final com.mojang.serialization.MapCodec<PlayerSkin.Patch> private final Optional<PlayerModelType> The field for themodelrecord component.static final StreamCodec<io.netty.buffer.ByteBuf, PlayerSkin.Patch> -
Constructor Summary
ConstructorsConstructorDescriptionPatch(Optional<ClientAsset.ResourceTexture> body, Optional<ClientAsset.ResourceTexture> cape, Optional<ClientAsset.ResourceTexture> elytra, Optional<PlayerModelType> model) Creates an instance of aPatchrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbody()Returns the value of thebodyrecord component.cape()Returns the value of thecaperecord component.static PlayerSkin.Patchcreate(Optional<ClientAsset.ResourceTexture> pBody, Optional<ClientAsset.ResourceTexture> pCape, Optional<ClientAsset.ResourceTexture> pElytra, Optional<PlayerModelType> pModel) 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.model()Returns the value of themodelrecord component.final StringtoString()Returns a string representation of this record class.
-
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. -
EMPTY
-
MAP_CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
Patch
public Patch(Optional<ClientAsset.ResourceTexture> body, Optional<ClientAsset.ResourceTexture> cape, Optional<ClientAsset.ResourceTexture> elytra, Optional<PlayerModelType> model) Creates an instance of aPatchrecord class.- Parameters:
body- the value for thebodyrecord componentcape- the value for thecaperecord componentelytra- the value for theelytrarecord componentmodel- the value for themodelrecord component
-
-
Method Details
-
create
public static PlayerSkin.Patch create(Optional<ClientAsset.ResourceTexture> pBody, Optional<ClientAsset.ResourceTexture> pCape, Optional<ClientAsset.ResourceTexture> pElytra, Optional<PlayerModelType> pModel) -
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 withObjects::equals(Object,Object). -
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
-