Class BedrockPlayerSkins

java.lang.Object
com.viaversion.viafabricplus.bedrock.render.BedrockPlayerSkins

public final class BedrockPlayerSkins extends Object
Owns client textures and geometry for Bedrock player appearances.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
     
    static final record 
     
    static final record 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.
     
    static void
     
    static void
    extractPitch(net.minecraft.world.entity.Avatar entity, net.minecraft.client.renderer.entity.state.AvatarRenderState state, float partialTick)
     
    static boolean
     
    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.
    static boolean
    firstPersonItemSubmitted(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 float
    firstPersonRotation(boolean pitch, float fallback)
     
    static boolean
     
    static boolean
    hasNativeFirstPersonAppearance(net.minecraft.client.player.LocalPlayer player)
    Uses native hand updates only for the matching, loaded actor appearance.
    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.
    options(net.minecraft.world.entity.player.PlayerSkin skin)
    Returns options belonging to this installed skin, including standard player models.
    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.
    preview(net.raphimc.viabedrock.protocol.model.SkinData skin)
    Creates a private menu appearance.
    static net.minecraft.client.model.Model.Simple
    previewModel(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<?>
    renderer(UUID playerUuid)
     
    static net.minecraft.client.renderer.entity.player.AvatarRenderer<?>
    renderer(net.minecraft.world.entity.player.PlayerSkin skin, float ageInTicks)
     
    static void
    rendererContext(net.minecraft.client.renderer.entity.EntityRendererProvider.Context context)
     
    static boolean
    serverBodyVisible(net.minecraft.client.renderer.entity.state.AvatarRenderState state)
     
    static net.minecraft.world.entity.player.PlayerSkin
    skin(UUID playerUuid, net.minecraft.world.entity.player.PlayerSkin fallback)
     
    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.
    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.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static BedrockClassicOptions options(net.minecraft.world.entity.player.PlayerSkin skin)
      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

      public static BedrockActorAnimation.Visibility bodyVisibility(UUID uuid)
    • 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()