NautilusInventoryScreen.java

net.minecraft.client.gui.screens.inventory.NautilusInventoryScreen

信息

  • 全限定名:net.minecraft.client.gui.screens.inventory.NautilusInventoryScreen
  • 类型:public class
  • 包:net.minecraft.client.gui.screens.inventory
  • 源码路径:src/main/java/net/minecraft/client/gui/screens/inventory/NautilusInventoryScreen.java
  • 起始行号:L13
  • 继承:AbstractMountInventoryScreen
  • 职责:

    TODO

字段/常量

  • SLOT_SPRITE

    • 类型: Identifier
    • 修饰符: private static final
    • 源码定位: L14
    • 说明:

      TODO

  • NAUTILUS_INVENTORY_LOCATION

    • 类型: Identifier
    • 修饰符: private static final
    • 源码定位: L15
    • 说明:

      TODO

内部类/嵌套类型

构造器

public NautilusInventoryScreen(NautilusInventoryMenu menu, Inventory inventory, AbstractNautilus nautilus, int inventoryColumns) @ L17

  • 构造器名:NautilusInventoryScreen
  • 源码定位:L17
  • 修饰符:public

参数:

  • menu: NautilusInventoryMenu
  • inventory: Inventory
  • nautilus: AbstractNautilus
  • inventoryColumns: int

说明:

TODO

方法

下面的方法块按源码顺序生成。

protected Identifier getBackgroundTextureLocation() @ L21

  • 方法名:getBackgroundTextureLocation
  • 源码定位:L21
  • 返回类型:Identifier
  • 修饰符:protected

参数:

说明:

TODO

protected Identifier getSlotSpriteLocation() @ L26

  • 方法名:getSlotSpriteLocation
  • 源码定位:L26
  • 返回类型:Identifier
  • 修饰符:protected

参数:

说明:

TODO

protected Identifier getChestSlotsSpriteLocation() @ L31

  • 方法名:getChestSlotsSpriteLocation
  • 源码定位:L31
  • 返回类型:Identifier
  • 修饰符:protected

参数:

说明:

TODO

protected boolean shouldRenderSaddleSlot() @ L36

  • 方法名:shouldRenderSaddleSlot
  • 源码定位:L36
  • 返回类型:boolean
  • 修饰符:protected

参数:

说明:

TODO

protected boolean shouldRenderArmorSlot() @ L41

  • 方法名:shouldRenderArmorSlot
  • 源码定位:L41
  • 返回类型:boolean
  • 修饰符:protected

参数:

说明:

TODO

代码

@OnlyIn(Dist.CLIENT)
public class NautilusInventoryScreen extends AbstractMountInventoryScreen<NautilusInventoryMenu> {
    private static final Identifier SLOT_SPRITE = Identifier.withDefaultNamespace("container/slot");
    private static final Identifier NAUTILUS_INVENTORY_LOCATION = Identifier.withDefaultNamespace("textures/gui/container/nautilus.png");
 
    public NautilusInventoryScreen(NautilusInventoryMenu menu, Inventory inventory, AbstractNautilus nautilus, int inventoryColumns) {
        super(menu, inventory, nautilus.getDisplayName(), inventoryColumns, nautilus);
    }
 
    @Override
    protected Identifier getBackgroundTextureLocation() {
        return NAUTILUS_INVENTORY_LOCATION;
    }
 
    @Override
    protected Identifier getSlotSpriteLocation() {
        return SLOT_SPRITE;
    }
 
    @Override
    protected @Nullable Identifier getChestSlotsSpriteLocation() {
        return null;
    }
 
    @Override
    protected boolean shouldRenderSaddleSlot() {
        return this.mount.canUseSlot(EquipmentSlot.SADDLE);
    }
 
    @Override
    protected boolean shouldRenderArmorSlot() {
        return this.mount.canUseSlot(EquipmentSlot.BODY);
    }
}

引用的其他类