Class BedrockPlayerSkins
java.lang.Object
com.viaversion.viafabricplus.bedrock.render.BedrockPlayerSkins
Owns client textures and geometry for Bedrock player appearances.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final record -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaccept(net.minecraft.network.Connection connection, UUID playerUuid, net.raphimc.viabedrock.protocol.model.SkinData skin) Installs a received or locally selected skin only in the connection that supplied it.static voidaccept(net.minecraft.network.Connection connection, net.raphimc.viabedrock.api.model.NativeSkinFragment fragment) Accepts the same complete skin transport from direct connections and ViaProxy.bodyVisibility(UUID uuid) static voidclear()static voidextractPitch(net.minecraft.world.entity.Avatar entity, net.minecraft.client.renderer.entity.state.AvatarRenderState state, float partialTick) static booleanstatic booleanfirstPersonBobbing(net.minecraft.client.renderer.entity.state.AvatarRenderState state, com.mojang.blaze3d.vertex.PoseStack poses, float partialTick) Applies native bobbing only when the submitted player uses our native actor graph.static booleanfirstPersonItemSubmitted(net.minecraft.world.InteractionHand hand) firstPersonProjection(net.minecraft.client.renderer.entity.state.AvatarRenderState state, net.minecraft.world.level.material.FogType fog, float partialTick) Uses the native hand camera only for the matching, loaded actor appearance.static floatfirstPersonRotation(boolean pitch, float fallback) static booleanstatic booleanhasNativeFirstPersonAppearance(net.minecraft.client.player.LocalPlayer player) Uses native hand updates only for the matching, loaded actor appearance.static net.minecraft.world.entity.player.PlayerSkinSupplies the square layout sampled by Java player glyphs and skull models.static BedrockClassicOptionsoptions(net.minecraft.world.entity.player.PlayerSkin skin) Returns options belonging to this installed skin, including standard player models.static Map<String, BedrockBoneAnimation.Transform> pose(net.minecraft.world.entity.Avatar entity, net.minecraft.client.renderer.entity.state.AvatarRenderState state, float partialTick) Samples the native actor graph once for the body and all of its attached surfaces.static BedrockPlayerSkins.Previewpreview(net.raphimc.viabedrock.protocol.model.SkinData skin) Creates a private menu appearance.static net.minecraft.client.model.Model.SimplepreviewModel(net.minecraft.resources.Identifier texture) previewSurfaces(net.minecraft.resources.Identifier texture) Supplies the additional animated surfaces in the same pose as a menu's primary skin.static net.minecraft.client.renderer.entity.player.AvatarRenderer<?> static net.minecraft.client.renderer.entity.player.AvatarRenderer<?> renderer(net.minecraft.world.entity.player.PlayerSkin skin, float ageInTicks) static voidrendererContext(net.minecraft.client.renderer.entity.EntityRendererProvider.Context context) static booleanserverBodyVisible(net.minecraft.client.renderer.entity.state.AvatarRenderState state) static net.minecraft.world.entity.player.PlayerSkinstatic voidsubmitFirstPerson(float partialTick, net.minecraft.client.renderer.entity.state.AvatarRenderState state, net.minecraft.client.renderer.state.level.FirstPersonHandsAndItemsRenderState items, Runnable submission) Keeps native first-person state local to hand submission, including nested submissions and failures.static voidsubmitFirstPersonActor(com.mojang.blaze3d.vertex.PoseStack poses, net.minecraft.client.renderer.SubmitNodeCollector collector, int packedLight) Submits the actor once before Java's per-hand item transforms.
-
Method Details
-
accept
public static void accept(net.minecraft.network.Connection connection, net.raphimc.viabedrock.api.model.NativeSkinFragment fragment) Accepts the same complete skin transport from direct connections and ViaProxy. -
accept
public static void accept(net.minecraft.network.Connection connection, UUID playerUuid, net.raphimc.viabedrock.protocol.model.SkinData skin) Installs a received or locally selected skin only in the connection that supplied it. -
preview
public static BedrockPlayerSkins.Preview preview(net.raphimc.viabedrock.protocol.model.SkinData skin) throws IOException Creates a private menu appearance. Call and close it on the Minecraft thread.- Throws:
IOException
-
skin
public static net.minecraft.world.entity.player.PlayerSkin skin(UUID playerUuid, net.minecraft.world.entity.player.PlayerSkin fallback) -
headSkin
public static net.minecraft.world.entity.player.PlayerSkin headSkin(UUID playerUuid, net.minecraft.world.entity.player.PlayerSkin fallback) Supplies the square layout sampled by Java player glyphs and skull models. -
hasInstalledSkins
public static boolean hasInstalledSkins() -
options
Returns options belonging to this installed skin, including standard player models. -
renderer
public static net.minecraft.client.renderer.entity.player.AvatarRenderer<?> renderer(UUID playerUuid) -
serverBodyVisible
public static boolean serverBodyVisible(net.minecraft.client.renderer.entity.state.AvatarRenderState state) -
bodyVisibility
-
pose
public static Map<String, BedrockBoneAnimation.Transform> pose(net.minecraft.world.entity.Avatar entity, net.minecraft.client.renderer.entity.state.AvatarRenderState state, float partialTick) Samples the native actor graph once for the body and all of its attached surfaces. -
submitFirstPerson
public static void submitFirstPerson(float partialTick, net.minecraft.client.renderer.entity.state.AvatarRenderState state, net.minecraft.client.renderer.state.level.FirstPersonHandsAndItemsRenderState items, Runnable submission) Keeps native first-person state local to hand submission, including nested submissions and failures. -
submitFirstPersonActor
public static void submitFirstPersonActor(com.mojang.blaze3d.vertex.PoseStack poses, net.minecraft.client.renderer.SubmitNodeCollector collector, int packedLight) Submits the actor once before Java's per-hand item transforms. -
firstPersonItemSubmitted
public static boolean firstPersonItemSubmitted(net.minecraft.world.InteractionHand hand) -
firstPersonActorSubmitted
public static boolean firstPersonActorSubmitted() -
firstPersonRotation
public static float firstPersonRotation(boolean pitch, float fallback) -
firstPersonBobbing
public static boolean firstPersonBobbing(net.minecraft.client.renderer.entity.state.AvatarRenderState state, com.mojang.blaze3d.vertex.PoseStack poses, float partialTick) Applies native bobbing only when the submitted player uses our native actor graph. -
firstPersonProjection
public static BedrockPlayerSkins.FirstPersonProjection firstPersonProjection(net.minecraft.client.renderer.entity.state.AvatarRenderState state, net.minecraft.world.level.material.FogType fog, float partialTick) Uses the native hand camera only for the matching, loaded actor appearance. -
hasNativeFirstPersonAppearance
public static boolean hasNativeFirstPersonAppearance(net.minecraft.client.player.LocalPlayer player) Uses native hand updates only for the matching, loaded actor appearance. -
extractPitch
public static void extractPitch(net.minecraft.world.entity.Avatar entity, net.minecraft.client.renderer.entity.state.AvatarRenderState state, float partialTick) -
renderer
public static net.minecraft.client.renderer.entity.player.AvatarRenderer<?> renderer(net.minecraft.world.entity.player.PlayerSkin skin, float ageInTicks) -
previewModel
public static net.minecraft.client.model.Model.Simple previewModel(net.minecraft.resources.Identifier texture) -
previewSurfaces
public static List<BedrockPlayerSkins.PreviewSurface> previewSurfaces(net.minecraft.resources.Identifier texture) Supplies the additional animated surfaces in the same pose as a menu's primary skin. -
rendererContext
public static void rendererContext(net.minecraft.client.renderer.entity.EntityRendererProvider.Context context) -
clear
public static void clear()
-