Java 类net.minecraft.server.InventoryEnderChest 实例源码

项目:CraftBukkit    文件:CraftInventory.java   
public InventoryType getType() {
    // Thanks to Droppers extending Dispensers, order is important.
    if (inventory instanceof InventoryCrafting) {
        return inventory.getSize() >= 9 ? InventoryType.WORKBENCH : InventoryType.CRAFTING;
    } else if (inventory instanceof PlayerInventory) {
        return InventoryType.PLAYER;
    } else if (inventory instanceof TileEntityDropper) {
        return InventoryType.DROPPER;
    } else if (inventory instanceof TileEntityDispenser) {
        return InventoryType.DISPENSER;
    } else if (inventory instanceof TileEntityFurnace) {
        return InventoryType.FURNACE;
    } else if (inventory instanceof ContainerEnchantTableInventory) {
        return InventoryType.ENCHANTING;
    } else if (inventory instanceof TileEntityBrewingStand) {
        return InventoryType.BREWING;
    } else if (inventory instanceof CraftInventoryCustom.MinecraftInventory) {
        return ((CraftInventoryCustom.MinecraftInventory) inventory).getType();
    } else if (inventory instanceof InventoryEnderChest) {
        return InventoryType.ENDER_CHEST;
    } else if (inventory instanceof InventoryMerchant) {
        return InventoryType.MERCHANT;
    } else if (inventory instanceof TileEntityBeacon) {
        return InventoryType.BEACON;
    } else if (inventory instanceof ContainerAnvilInventory) {
        return InventoryType.ANVIL;
    } else if (inventory instanceof IHopper) {
        return InventoryType.HOPPER;
    } else {
        return InventoryType.CHEST;
    }
}
项目:Craftbukkit    文件:CraftInventory.java   
public InventoryType getType() {
    // Thanks to Droppers extending Dispensers, order is important.
    if (inventory instanceof InventoryCrafting) {
        return inventory.getSize() >= 9 ? InventoryType.WORKBENCH : InventoryType.CRAFTING;
    } else if (inventory instanceof PlayerInventory) {
        return InventoryType.PLAYER;
    } else if (inventory instanceof TileEntityDropper) {
        return InventoryType.DROPPER;
    } else if (inventory instanceof TileEntityDispenser) {
        return InventoryType.DISPENSER;
    } else if (inventory instanceof TileEntityFurnace) {
        return InventoryType.FURNACE;
    } else if (this instanceof CraftInventoryEnchanting) {
       return InventoryType.ENCHANTING;
    } else if (inventory instanceof TileEntityBrewingStand) {
        return InventoryType.BREWING;
    } else if (inventory instanceof CraftInventoryCustom.MinecraftInventory) {
        return ((CraftInventoryCustom.MinecraftInventory) inventory).getType();
    } else if (inventory instanceof InventoryEnderChest) {
        return InventoryType.ENDER_CHEST;
    } else if (inventory instanceof InventoryMerchant) {
        return InventoryType.MERCHANT;
    } else if (inventory instanceof TileEntityBeacon) {
        return InventoryType.BEACON;
    } else if (this instanceof CraftInventoryAnvil) {
       return InventoryType.ANVIL;
    } else if (inventory instanceof IHopper) {
        return InventoryType.HOPPER;
    } else {
        return InventoryType.CHEST;
    }
}
项目:Almura-Server    文件:CraftInventory.java   
public InventoryType getType() {
    // Thanks to Droppers extending Dispensers, order is important.
    if (inventory instanceof InventoryCrafting) {
        return inventory.getSize() >= 9 ? InventoryType.WORKBENCH : InventoryType.CRAFTING;
    } else if (inventory instanceof PlayerInventory) {
        return InventoryType.PLAYER;
    } else if (inventory instanceof TileEntityDropper) {
        return InventoryType.DROPPER;
    } else if (inventory instanceof TileEntityDispenser) {
        return InventoryType.DISPENSER;
    } else if (inventory instanceof TileEntityFurnace) {
        return InventoryType.FURNACE;
    } else if (inventory instanceof ContainerEnchantTableInventory) {
        return InventoryType.ENCHANTING;
    } else if (inventory instanceof TileEntityBrewingStand) {
        return InventoryType.BREWING;
    } else if (inventory instanceof CraftInventoryCustom.MinecraftInventory) {
        return ((CraftInventoryCustom.MinecraftInventory) inventory).getType();
    } else if (inventory instanceof InventoryEnderChest) {
        return InventoryType.ENDER_CHEST;
    } else if (inventory instanceof InventoryMerchant) {
        return InventoryType.MERCHANT;
    } else if (inventory instanceof TileEntityBeacon) {
        return InventoryType.BEACON;
    } else if (inventory instanceof ContainerAnvilInventory) {
        return InventoryType.ANVIL;
    } else if (inventory instanceof IHopper) {
        return InventoryType.HOPPER;
    } else {
        return InventoryType.CHEST;
    }
}
项目:Tweakkit-Server    文件:CraftInventory.java   
public InventoryType getType() {
    // Thanks to Droppers extending Dispensers, order is important.
    if (inventory instanceof InventoryCrafting) {
        return inventory.getSize() >= 9 ? InventoryType.WORKBENCH : InventoryType.CRAFTING;
    } else if (inventory instanceof PlayerInventory) {
        return InventoryType.PLAYER;
    } else if (inventory instanceof TileEntityDropper) {
        return InventoryType.DROPPER;
    } else if (inventory instanceof TileEntityDispenser) {
        return InventoryType.DISPENSER;
    } else if (inventory instanceof TileEntityFurnace) {
        return InventoryType.FURNACE;
    } else if (inventory instanceof ContainerEnchantTableInventory) {
        return InventoryType.ENCHANTING;
    } else if (inventory instanceof TileEntityBrewingStand) {
        return InventoryType.BREWING;
    } else if (inventory instanceof CraftInventoryCustom.MinecraftInventory) {
        return ((CraftInventoryCustom.MinecraftInventory) inventory).getType();
    } else if (inventory instanceof InventoryEnderChest) {
        return InventoryType.ENDER_CHEST;
    } else if (inventory instanceof InventoryMerchant) {
        return InventoryType.MERCHANT;
    } else if (inventory instanceof TileEntityBeacon) {
        return InventoryType.BEACON;
    } else if (inventory instanceof ContainerAnvilInventory) {
        return InventoryType.ANVIL;
    } else if (inventory instanceof IHopper) {
        return InventoryType.HOPPER;
    } else {
        return InventoryType.CHEST;
    }
}
项目:SpigotSource    文件:CraftInventory.java   
public InventoryType getType() {
    // Thanks to Droppers extending Dispensers, order is important.
    if (inventory instanceof InventoryCrafting) {
        return inventory.getSize() >= 9 ? InventoryType.WORKBENCH : InventoryType.CRAFTING;
    } else if (inventory instanceof PlayerInventory) {
        return InventoryType.PLAYER;
    } else if (inventory instanceof TileEntityDropper) {
        return InventoryType.DROPPER;
    } else if (inventory instanceof TileEntityDispenser) {
        return InventoryType.DISPENSER;
    } else if (inventory instanceof TileEntityFurnace) {
        return InventoryType.FURNACE;
    } else if (this instanceof CraftInventoryEnchanting) {
       return InventoryType.ENCHANTING;
    } else if (inventory instanceof TileEntityBrewingStand) {
        return InventoryType.BREWING;
    } else if (inventory instanceof CraftInventoryCustom.MinecraftInventory) {
        return ((CraftInventoryCustom.MinecraftInventory) inventory).getType();
    } else if (inventory instanceof InventoryEnderChest) {
        return InventoryType.ENDER_CHEST;
    } else if (inventory instanceof InventoryMerchant) {
        return InventoryType.MERCHANT;
    } else if (inventory instanceof TileEntityBeacon) {
        return InventoryType.BEACON;
    } else if (this instanceof CraftInventoryAnvil) {
       return InventoryType.ANVIL;
    } else if (inventory instanceof IHopper) {
        return InventoryType.HOPPER;
    } else {
        return InventoryType.CHEST;
    }
}
项目:Craft-city    文件:CraftInventory.java   
public InventoryType getType() {
    // Thanks to Droppers extending Dispensers, order is important.
    if (inventory instanceof InventoryCrafting) {
        return inventory.getSize() >= 9 ? InventoryType.WORKBENCH : InventoryType.CRAFTING;
    } else if (inventory instanceof PlayerInventory) {
        return InventoryType.PLAYER;
    } else if (inventory instanceof TileEntityDropper) {
        return InventoryType.DROPPER;
    } else if (inventory instanceof TileEntityDispenser) {
        return InventoryType.DISPENSER;
    } else if (inventory instanceof TileEntityFurnace) {
        return InventoryType.FURNACE;
    } else if (inventory instanceof ContainerEnchantTableInventory) {
        return InventoryType.ENCHANTING;
    } else if (inventory instanceof TileEntityBrewingStand) {
        return InventoryType.BREWING;
    } else if (inventory instanceof CraftInventoryCustom.MinecraftInventory) {
        return ((CraftInventoryCustom.MinecraftInventory) inventory).getType();
    } else if (inventory instanceof InventoryEnderChest) {
        return InventoryType.ENDER_CHEST;
    } else if (inventory instanceof InventoryMerchant) {
        return InventoryType.MERCHANT;
    } else if (inventory instanceof TileEntityBeacon) {
        return InventoryType.BEACON;
    } else if (inventory instanceof ContainerAnvilInventory) {
        return InventoryType.ANVIL;
    } else if (inventory instanceof IHopper) {
        return InventoryType.HOPPER;
    } else {
        return InventoryType.CHEST;
    }
}