DebugEntityBlockIntersection.java

net.minecraft.util.debug.DebugEntityBlockIntersection

信息

  • 全限定名:net.minecraft.util.debug.DebugEntityBlockIntersection
  • 类型:public enum
  • 包:net.minecraft.util.debug
  • 源码路径:src/main/java/net/minecraft/util/debug/DebugEntityBlockIntersection.java
  • 起始行号:L9
  • 职责:

    TODO

字段/常量

  • IN_BLOCK, IN_FLUID, IN_AIR

    • 类型: DebugEntityBlockIntersection
    • 修饰符: package-private
    • 源码定位: L10
    • 说明:

      TODO

  • BY_ID

    • 类型: IntFunction<DebugEntityBlockIntersection>
    • 修饰符: private static final
    • 源码定位: L14
    • 说明:

      TODO

  • STREAM_CODEC

    • 类型: StreamCodec<ByteBuf,DebugEntityBlockIntersection>
    • 修饰符: public static final
    • 源码定位: L15
    • 说明:

      TODO

  • id

    • 类型: int
    • 修饰符: private final
    • 源码定位: L16
    • 说明:

      TODO

  • color

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

      TODO

内部类/嵌套类型

构造器

private DebugEntityBlockIntersection(int id, int color) @ L19

  • 构造器名:DebugEntityBlockIntersection
  • 源码定位:L19
  • 修饰符:private

参数:

  • id: int
  • color: int

说明:

TODO

方法

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

public int color() @ L24

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

参数:

说明:

TODO

代码

public enum DebugEntityBlockIntersection {
    IN_BLOCK(0, 1610678016),
    IN_FLUID(1, 1610612991),
    IN_AIR(2, 1613968179);
 
    private static final IntFunction<DebugEntityBlockIntersection> BY_ID = ByIdMap.continuous(i -> i.id, values(), ByIdMap.OutOfBoundsStrategy.ZERO);
    public static final StreamCodec<ByteBuf, DebugEntityBlockIntersection> STREAM_CODEC = ByteBufCodecs.idMapper(BY_ID, i -> i.id);
    private final int id;
    private final int color;
 
    private DebugEntityBlockIntersection(int id, int color) {
        this.id = id;
        this.color = color;
    }
 
    public int color() {
        return this.color;
    }
}

引用的其他类

  • ByteBufCodecs

    • 引用位置: 方法调用
    • 关联成员: ByteBufCodecs.idMapper()
  • StreamCodec

    • 引用位置: 字段
  • ByIdMap

    • 引用位置: 方法调用
    • 关联成员: ByIdMap.continuous()