GrindstoneScreen.java
net.minecraft.client.gui.screens.inventory.GrindstoneScreen
信息
- 全限定名:net.minecraft.client.gui.screens.inventory.GrindstoneScreen
- 类型:public class
- 包:net.minecraft.client.gui.screens.inventory
- 源码路径:src/main/java/net/minecraft/client/gui/screens/inventory/GrindstoneScreen.java
- 起始行号:L13
- 继承:AbstractContainerScreen
- 职责:
TODO
字段/常量
-
ERROR_SPRITE- 类型:
Identifier - 修饰符:
private static final - 源码定位:
L14 - 说明:
TODO
- 类型:
-
GRINDSTONE_LOCATION- 类型:
Identifier - 修饰符:
private static final - 源码定位:
L15 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
public GrindstoneScreen(GrindstoneMenu menu, Inventory inventory, Component title) @ L17
- 构造器名:GrindstoneScreen
- 源码定位:L17
- 修饰符:public
参数:
- menu: GrindstoneMenu
- inventory: Inventory
- title: Component
说明:
TODO
方法
下面的方法块按源码顺序生成。
public void extractBackground(GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) @ L21
- 方法名:extractBackground
- 源码定位:L21
- 返回类型:void
- 修饰符:public
参数:
- graphics: GuiGraphicsExtractor
- mouseX: int
- mouseY: int
- a: float
说明:
TODO
代码
@OnlyIn(Dist.CLIENT)
public class GrindstoneScreen extends AbstractContainerScreen<GrindstoneMenu> {
private static final Identifier ERROR_SPRITE = Identifier.withDefaultNamespace("container/grindstone/error");
private static final Identifier GRINDSTONE_LOCATION = Identifier.withDefaultNamespace("textures/gui/container/grindstone.png");
public GrindstoneScreen(GrindstoneMenu menu, Inventory inventory, Component title) {
super(menu, inventory, title);
}
@Override
public void extractBackground(GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) {
super.extractBackground(graphics, mouseX, mouseY, a);
int xo = (this.width - this.imageWidth) / 2;
int yo = (this.height - this.imageHeight) / 2;
graphics.blit(RenderPipelines.GUI_TEXTURED, GRINDSTONE_LOCATION, xo, yo, 0.0F, 0.0F, this.imageWidth, this.imageHeight, 256, 256);
if ((this.menu.getSlot(0).hasItem() || this.menu.getSlot(1).hasItem()) && !this.menu.getSlot(2).hasItem()) {
graphics.blitSprite(RenderPipelines.GUI_TEXTURED, ERROR_SPRITE, xo + 92, yo + 31, 28, 21);
}
}
}引用的其他类
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
继承
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
字段/方法调用 - 关联成员:
Identifier.withDefaultNamespace()
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
参数
- 引用位置: