HopperScreen.java
net.minecraft.client.gui.screens.inventory.HopperScreen
信息
- 全限定名:net.minecraft.client.gui.screens.inventory.HopperScreen
- 类型:public class
- 包:net.minecraft.client.gui.screens.inventory
- 源码路径:src/main/java/net/minecraft/client/gui/screens/inventory/HopperScreen.java
- 起始行号:L13
- 继承:AbstractContainerScreen
- 职责:
TODO
字段/常量
HOPPER_LOCATION- 类型:
Identifier - 修饰符:
private static final - 源码定位:
L14 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
public HopperScreen(HopperMenu menu, Inventory inventory, Component title) @ L16
- 构造器名:HopperScreen
- 源码定位:L16
- 修饰符:public
参数:
- menu: HopperMenu
- 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 HopperScreen extends AbstractContainerScreen<HopperMenu> {
private static final Identifier HOPPER_LOCATION = Identifier.withDefaultNamespace("textures/gui/container/hopper.png");
public HopperScreen(HopperMenu menu, Inventory inventory, Component title) {
super(menu, inventory, title, 176, 133);
this.inventoryLabelY = this.imageHeight - 94;
}
@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, HOPPER_LOCATION, xo, yo, 0.0F, 0.0F, this.imageWidth, this.imageHeight, 256, 256);
}
}引用的其他类
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
继承
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
字段/方法调用 - 关联成员:
Identifier.withDefaultNamespace()
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
参数
- 引用位置: