BreezeDebugRenderer.java
net.minecraft.client.renderer.debug.BreezeDebugRenderer
信息
- 全限定名:net.minecraft.client.renderer.debug.BreezeDebugRenderer
- 类型:public class
- 包:net.minecraft.client.renderer.debug
- 源码路径:src/main/java/net/minecraft/client/renderer/debug/BreezeDebugRenderer.java
- 起始行号:L17
- 实现:DebugRenderer.SimpleDebugRenderer
- 职责:
TODO
字段/常量
-
JUMP_TARGET_LINE_COLOR- 类型:
int - 修饰符:
private static final - 源码定位:
L18 - 说明:
TODO
- 类型:
-
TARGET_LINE_COLOR- 类型:
int - 修饰符:
private static final - 源码定位:
L19 - 说明:
TODO
- 类型:
-
INNER_CIRCLE_COLOR- 类型:
int - 修饰符:
private static final - 源码定位:
L20 - 说明:
TODO
- 类型:
-
MIDDLE_CIRCLE_COLOR- 类型:
int - 修饰符:
private static final - 源码定位:
L21 - 说明:
TODO
- 类型:
-
OUTER_CIRCLE_COLOR- 类型:
int - 修饰符:
private static final - 源码定位:
L22 - 说明:
TODO
- 类型:
-
minecraft- 类型:
Minecraft - 修饰符:
private final - 源码定位:
L23 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
public BreezeDebugRenderer(Minecraft minecraft) @ L25
- 构造器名:BreezeDebugRenderer
- 源码定位:L25
- 修饰符:public
参数:
- minecraft: Minecraft
说明:
TODO
方法
下面的方法块按源码顺序生成。
public void emitGizmos(double camX, double camY, double camZ, DebugValueAccess debugValues, Frustum frustum, float partialTicks) @ L29
- 方法名:emitGizmos
- 源码定位:L29
- 返回类型:void
- 修饰符:public
参数:
- camX: double
- camY: double
- camZ: double
- debugValues: DebugValueAccess
- frustum: Frustum
- partialTicks: float
说明:
TODO
代码
@OnlyIn(Dist.CLIENT)
public class BreezeDebugRenderer implements DebugRenderer.SimpleDebugRenderer {
private static final int JUMP_TARGET_LINE_COLOR = ARGB.color(255, 255, 100, 255);
private static final int TARGET_LINE_COLOR = ARGB.color(255, 100, 255, 255);
private static final int INNER_CIRCLE_COLOR = ARGB.color(255, 0, 255, 0);
private static final int MIDDLE_CIRCLE_COLOR = ARGB.color(255, 255, 165, 0);
private static final int OUTER_CIRCLE_COLOR = ARGB.color(255, 255, 0, 0);
private final Minecraft minecraft;
public BreezeDebugRenderer(Minecraft minecraft) {
this.minecraft = minecraft;
}
@Override
public void emitGizmos(double camX, double camY, double camZ, DebugValueAccess debugValues, Frustum frustum, float partialTicks) {
ClientLevel level = this.minecraft.level;
debugValues.forEachEntity(
DebugSubscriptions.BREEZES,
(entity, info) -> {
info.attackTarget()
.map(level::getEntity)
.map(targetEntity -> targetEntity.getPosition(this.minecraft.getDeltaTracker().getGameTimeDeltaPartialTick(true)))
.ifPresent(attackTargetPosition -> {
Gizmos.arrow(entity.position(), attackTargetPosition, TARGET_LINE_COLOR);
Vec3 drawCenter = attackTargetPosition.add(0.0, 0.01F, 0.0);
Gizmos.circle(drawCenter, 4.0F, GizmoStyle.stroke(INNER_CIRCLE_COLOR));
Gizmos.circle(drawCenter, 8.0F, GizmoStyle.stroke(MIDDLE_CIRCLE_COLOR));
Gizmos.circle(drawCenter, 24.0F, GizmoStyle.stroke(OUTER_CIRCLE_COLOR));
});
info.jumpTarget().ifPresent(blockPos -> {
Gizmos.arrow(entity.position(), blockPos.getCenter(), JUMP_TARGET_LINE_COLOR);
Gizmos.cuboid(AABB.unitCubeFromLowerCorner(Vec3.atLowerCornerOf(blockPos)), GizmoStyle.fill(ARGB.colorFromFloat(1.0F, 1.0F, 0.0F, 0.0F)));
});
}
);
}
}引用的其他类
-
- 引用位置:
参数/字段
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
实现
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
GizmoStyle.fill(), GizmoStyle.stroke()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
Gizmos.arrow(), Gizmos.circle(), Gizmos.cuboid()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
ARGB.color(), ARGB.colorFromFloat()
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
AABB.unitCubeFromLowerCorner()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
Vec3.atLowerCornerOf()
- 引用位置: