WolfRenderState.java

net.minecraft.client.renderer.entity.state.WolfRenderState

信息

  • 全限定名:net.minecraft.client.renderer.entity.state.WolfRenderState
  • 类型:public class
  • 包:net.minecraft.client.renderer.entity.state
  • 源码路径:src/main/java/net/minecraft/client/renderer/entity/state/WolfRenderState.java
  • 起始行号:L12
  • 继承:LivingEntityRenderState
  • 职责:

    TODO

字段/常量

  • DEFAULT_TEXTURE

    • 类型: Identifier
    • 修饰符: private static final
    • 源码定位: L13
    • 说明:

      TODO

  • isAngry

    • 类型: boolean
    • 修饰符: public
    • 源码定位: L14
    • 说明:

      TODO

  • isSitting

    • 类型: boolean
    • 修饰符: public
    • 源码定位: L15
    • 说明:

      TODO

  • tailAngle

    • 类型: float
    • 修饰符: public
    • 源码定位: L16
    • 说明:

      TODO

  • headRollAngle

    • 类型: float
    • 修饰符: public
    • 源码定位: L17
    • 说明:

      TODO

  • shakeAnim

    • 类型: float
    • 修饰符: public
    • 源码定位: L18
    • 说明:

      TODO

  • wetShade

    • 类型: float
    • 修饰符: public
    • 源码定位: L19
    • 说明:

      TODO

  • texture

    • 类型: Identifier
    • 修饰符: public
    • 源码定位: L20
    • 说明:

      TODO

  • collarColor

    • 类型: DyeColor
    • 修饰符: public
    • 源码定位: L21
    • 说明:

      TODO

  • bodyArmorItem

    • 类型: ItemStack
    • 修饰符: public
    • 源码定位: L22
    • 说明:

      TODO

内部类/嵌套类型

构造器

方法

下面的方法块按源码顺序生成。

public float getBodyRollAngle(float offset) @ L24

  • 方法名:getBodyRollAngle
  • 源码定位:L24
  • 返回类型:float
  • 修饰符:public

参数:

  • offset: float

说明:

TODO

代码

@OnlyIn(Dist.CLIENT)
public class WolfRenderState extends LivingEntityRenderState {
    private static final Identifier DEFAULT_TEXTURE = Identifier.withDefaultNamespace("textures/entity/wolf/wolf.png");
    public boolean isAngry;
    public boolean isSitting;
    public float tailAngle = (float) (Math.PI / 5);
    public float headRollAngle;
    public float shakeAnim;
    public float wetShade = 1.0F;
    public Identifier texture = DEFAULT_TEXTURE;
    public @Nullable DyeColor collarColor;
    public ItemStack bodyArmorItem = ItemStack.EMPTY;
 
    public float getBodyRollAngle(float offset) {
        float progress = (this.shakeAnim + offset) / 1.8F;
        if (progress < 0.0F) {
            progress = 0.0F;
        } else if (progress > 1.0F) {
            progress = 1.0F;
        }
 
        return Mth.sin(progress * (float) Math.PI) * Mth.sin(progress * (float) Math.PI * 11.0F) * 0.15F * (float) Math.PI;
    }
}

引用的其他类