Panorama.java
net.minecraft.client.renderer.Panorama
信息
- 全限定名:net.minecraft.client.renderer.Panorama
- 类型:public class
- 包:net.minecraft.client.renderer
- 源码路径:src/main/java/net/minecraft/client/renderer/Panorama.java
- 起始行号:L12
- 职责:
TODO
字段/常量
-
PANORAMA_OVERLAY- 类型:
Identifier - 修饰符:
public static final - 源码定位:
L13 - 说明:
TODO
- 类型:
-
spin- 类型:
float - 修饰符:
private - 源码定位:
L14 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
- 无
方法
下面的方法块按源码顺序生成。
public void extractRenderState(GuiGraphicsExtractor graphics, int width, int height, boolean shouldSpin) @ L16
- 方法名:extractRenderState
- 源码定位:L16
- 返回类型:void
- 修饰符:public
参数:
- graphics: GuiGraphicsExtractor
- width: int
- height: int
- shouldSpin: boolean
说明:
TODO
代码
@OnlyIn(Dist.CLIENT)
public class Panorama {
public static final Identifier PANORAMA_OVERLAY = Identifier.withDefaultNamespace("textures/gui/title/background/panorama_overlay.png");
private float spin;
public void extractRenderState(GuiGraphicsExtractor graphics, int width, int height, boolean shouldSpin) {
Minecraft minecraft = Minecraft.getInstance();
if (shouldSpin) {
float a = minecraft.getDeltaTracker().getRealtimeDeltaTicks();
float delta = (float)(a * minecraft.gameRenderer.getGameRenderState().optionsRenderState.panoramaSpeed);
this.spin = Mth.wrapDegrees(this.spin + delta * 0.1F);
}
minecraft.gameRenderer.getGameRenderState().guiRenderState.panoramaRenderState = new PanoramaRenderState(-this.spin);
graphics.blit(RenderPipelines.GUI_TEXTURED, PANORAMA_OVERLAY, 0, 0, 0.0F, 0.0F, width, height, 16, 128, 16, 128);
}
}引用的其他类
-
- 引用位置:
方法调用 - 关联成员:
Minecraft.getInstance()
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
构造调用 - 关联成员:
PanoramaRenderState()
- 引用位置:
-
- 引用位置:
字段/方法调用 - 关联成员:
Identifier.withDefaultNamespace()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
Mth.wrapDegrees()
- 引用位置: