PlayerFaceExtractor.java
net.minecraft.client.gui.components.PlayerFaceExtractor
信息
- 全限定名:net.minecraft.client.gui.components.PlayerFaceExtractor
- 类型:public class
- 包:net.minecraft.client.gui.components
- 源码路径:src/main/java/net/minecraft/client/gui/components/PlayerFaceExtractor.java
- 起始行号:L11
- 职责:
TODO
字段/常量
-
SKIN_HEAD_U- 类型:
int - 修饰符:
public static final - 源码定位:
L12 - 说明:
TODO
- 类型:
-
SKIN_HEAD_V- 类型:
int - 修饰符:
public static final - 源码定位:
L13 - 说明:
TODO
- 类型:
-
SKIN_HEAD_WIDTH- 类型:
int - 修饰符:
public static final - 源码定位:
L14 - 说明:
TODO
- 类型:
-
SKIN_HEAD_HEIGHT- 类型:
int - 修饰符:
public static final - 源码定位:
L15 - 说明:
TODO
- 类型:
-
SKIN_HAT_U- 类型:
int - 修饰符:
public static final - 源码定位:
L16 - 说明:
TODO
- 类型:
-
SKIN_HAT_V- 类型:
int - 修饰符:
public static final - 源码定位:
L17 - 说明:
TODO
- 类型:
-
SKIN_HAT_WIDTH- 类型:
int - 修饰符:
public static final - 源码定位:
L18 - 说明:
TODO
- 类型:
-
SKIN_HAT_HEIGHT- 类型:
int - 修饰符:
public static final - 源码定位:
L19 - 说明:
TODO
- 类型:
-
SKIN_TEX_WIDTH- 类型:
int - 修饰符:
public static final - 源码定位:
L20 - 说明:
TODO
- 类型:
-
SKIN_TEX_HEIGHT- 类型:
int - 修饰符:
public static final - 源码定位:
L21 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
- 无
方法
下面的方法块按源码顺序生成。
public static void extractRenderState(GuiGraphicsExtractor graphics, PlayerSkin skin, int x, int y, int size) @ L23
- 方法名:extractRenderState
- 源码定位:L23
- 返回类型:void
- 修饰符:public static
参数:
- graphics: GuiGraphicsExtractor
- skin: PlayerSkin
- x: int
- y: int
- size: int
说明:
TODO
public static void extractRenderState(GuiGraphicsExtractor graphics, PlayerSkin skin, int x, int y, int size, int color) @ L27
- 方法名:extractRenderState
- 源码定位:L27
- 返回类型:void
- 修饰符:public static
参数:
- graphics: GuiGraphicsExtractor
- skin: PlayerSkin
- x: int
- y: int
- size: int
- color: int
说明:
TODO
public static void extractRenderState(GuiGraphicsExtractor graphics, Identifier texture, int x, int y, int size, boolean hat, boolean flip, int color) @ L31
- 方法名:extractRenderState
- 源码定位:L31
- 返回类型:void
- 修饰符:public static
参数:
- graphics: GuiGraphicsExtractor
- texture: Identifier
- x: int
- y: int
- size: int
- hat: boolean
- flip: boolean
- color: int
说明:
TODO
private static void extractHat(GuiGraphicsExtractor graphics, Identifier texture, int x, int y, int size, boolean flip, int color) @ L40
- 方法名:extractHat
- 源码定位:L40
- 返回类型:void
- 修饰符:private static
参数:
- graphics: GuiGraphicsExtractor
- texture: Identifier
- x: int
- y: int
- size: int
- flip: boolean
- color: int
说明:
TODO
代码
@OnlyIn(Dist.CLIENT)
public class PlayerFaceExtractor {
public static final int SKIN_HEAD_U = 8;
public static final int SKIN_HEAD_V = 8;
public static final int SKIN_HEAD_WIDTH = 8;
public static final int SKIN_HEAD_HEIGHT = 8;
public static final int SKIN_HAT_U = 40;
public static final int SKIN_HAT_V = 8;
public static final int SKIN_HAT_WIDTH = 8;
public static final int SKIN_HAT_HEIGHT = 8;
public static final int SKIN_TEX_WIDTH = 64;
public static final int SKIN_TEX_HEIGHT = 64;
public static void extractRenderState(GuiGraphicsExtractor graphics, PlayerSkin skin, int x, int y, int size) {
extractRenderState(graphics, skin, x, y, size, -1);
}
public static void extractRenderState(GuiGraphicsExtractor graphics, PlayerSkin skin, int x, int y, int size, int color) {
extractRenderState(graphics, skin.body().texturePath(), x, y, size, true, false, color);
}
public static void extractRenderState(GuiGraphicsExtractor graphics, Identifier texture, int x, int y, int size, boolean hat, boolean flip, int color) {
int skinHeadV = 8 + (flip ? 8 : 0);
int skinHeadHeight = 8 * (flip ? -1 : 1);
graphics.blit(RenderPipelines.GUI_TEXTURED, texture, x, y, 8.0F, skinHeadV, size, size, 8, skinHeadHeight, 64, 64, color);
if (hat) {
extractHat(graphics, texture, x, y, size, flip, color);
}
}
private static void extractHat(GuiGraphicsExtractor graphics, Identifier texture, int x, int y, int size, boolean flip, int color) {
int skinHatV = 8 + (flip ? 8 : 0);
int skinHatHeight = 8 * (flip ? -1 : 1);
graphics.blit(RenderPipelines.GUI_TEXTURED, texture, x, y, 40.0F, skinHatV, size, size, 8, skinHatHeight, 64, 64, color);
}
}引用的其他类
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
参数
- 引用位置: