EntityRenderState.java

net.minecraft.client.renderer.entity.state.EntityRenderState

信息

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

    TODO

字段/常量

  • NO_OUTLINE

    • 类型: int
    • 修饰符: public static final
    • 源码定位: L17
    • 说明:

      TODO

  • entityType

    • 类型: EntityType<?>
    • 修饰符: public
    • 源码定位: L18
    • 说明:

      TODO

  • x

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

      TODO

  • y

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

      TODO

  • z

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

      TODO

  • ageInTicks

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

      TODO

  • boundingBoxWidth

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

      TODO

  • boundingBoxHeight

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

      TODO

  • eyeHeight

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

      TODO

  • distanceToCameraSq

    • 类型: double
    • 修饰符: public
    • 源码定位: L26
    • 说明:

      TODO

  • isInvisible

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

      TODO

  • isDiscrete

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

      TODO

  • displayFireAnimation

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

      TODO

  • lightCoords

    • 类型: int
    • 修饰符: public
    • 源码定位: L30
    • 说明:

      TODO

  • outlineColor

    • 类型: int
    • 修饰符: public
    • 源码定位: L31
    • 说明:

      TODO

  • passengerOffset

    • 类型: Vec3
    • 修饰符: public
    • 源码定位: L32
    • 说明:

      TODO

  • nameTag

    • 类型: Component
    • 修饰符: public
    • 源码定位: L33
    • 说明:

      TODO

  • scoreText

    • 类型: Component
    • 修饰符: public
    • 源码定位: L34
    • 说明:

      TODO

  • nameTagAttachment

    • 类型: Vec3
    • 修饰符: public
    • 源码定位: L35
    • 说明:

      TODO

  • leashStates

    • 类型: List<EntityRenderState.LeashState>
    • 修饰符: public
    • 源码定位: L36
    • 说明:

      TODO

  • shadowRadius

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

      TODO

  • shadowPieces

    • 类型: List<EntityRenderState.ShadowPiece>
    • 修饰符: public final
    • 源码定位: L38
    • 说明:

      TODO

内部类/嵌套类型

  • net.minecraft.client.renderer.entity.state.EntityRenderState.LeashState

    • 类型: class
    • 修饰符: public static
    • 源码定位: L50
    • 说明:

      TODO

  • net.minecraft.client.renderer.entity.state.EntityRenderState.ShadowPiece

    • 类型: record
    • 修饰符: public
    • 源码定位: L62
    • 说明:

      TODO

构造器

方法

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

public boolean appearsGlowing() @ L40

  • 方法名:appearsGlowing
  • 源码定位:L40
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public void fillCrashReportCategory(CrashReportCategory category) @ L44

  • 方法名:fillCrashReportCategory
  • 源码定位:L44
  • 返回类型:void
  • 修饰符:public

参数:

  • category: CrashReportCategory

说明:

TODO

代码

@OnlyIn(Dist.CLIENT)
public class EntityRenderState {
    public static final int NO_OUTLINE = 0;
    public EntityType<?> entityType;
    public double x;
    public double y;
    public double z;
    public float ageInTicks;
    public float boundingBoxWidth;
    public float boundingBoxHeight;
    public float eyeHeight;
    public double distanceToCameraSq;
    public boolean isInvisible;
    public boolean isDiscrete;
    public boolean displayFireAnimation;
    public int lightCoords = 15728880;
    public int outlineColor = 0;
    public @Nullable Vec3 passengerOffset;
    public @Nullable Component nameTag;
    public @Nullable Component scoreText;
    public @Nullable Vec3 nameTagAttachment;
    public @Nullable List<EntityRenderState.LeashState> leashStates;
    public float shadowRadius;
    public final List<EntityRenderState.ShadowPiece> shadowPieces = new ArrayList<>();
 
    public boolean appearsGlowing() {
        return this.outlineColor != 0;
    }
 
    public void fillCrashReportCategory(CrashReportCategory category) {
        category.setDetail("EntityRenderState", this.getClass().getCanonicalName());
        category.setDetail("Entity's Exact location", String.format(Locale.ROOT, "%.2f, %.2f, %.2f", this.x, this.y, this.z));
    }
 
    @OnlyIn(Dist.CLIENT)
    public static class LeashState {
        public Vec3 offset = Vec3.ZERO;
        public Vec3 start = Vec3.ZERO;
        public Vec3 end = Vec3.ZERO;
        public int startBlockLight = 0;
        public int endBlockLight = 0;
        public int startSkyLight = 15;
        public int endSkyLight = 15;
        public boolean slack = true;
    }
 
    @OnlyIn(Dist.CLIENT)
    public record ShadowPiece(float relativeX, float relativeY, float relativeZ, VoxelShape shapeBelow, float alpha) {
    }
}

引用的其他类