Search in sources :

Example 11 with CraftInventoryView

use of org.bukkit.craftbukkit.v.inventory.CraftInventoryView in project Arclight by IzzelAliz.

the class RepairContainerMixin method getBukkitView.

@Override
public CraftInventoryView getBukkitView() {
    if (bukkitEntity != null) {
        return bukkitEntity;
    }
    CraftInventory inventory = new CraftInventoryAnvil(((IWorldPosCallableBridge) this.worldPosCallable).bridge$getLocation(), this.inputSlots, this.outputSlot, (RepairContainer) (Object) this);
    bukkitEntity = new CraftInventoryView(((PlayerEntityBridge) this.player).bridge$getBukkitEntity(), inventory, (Container) (Object) this);
    return bukkitEntity;
}
Also used : CraftInventory(org.bukkit.craftbukkit.v.inventory.CraftInventory) Container(net.minecraft.inventory.container.Container) RepairContainer(net.minecraft.inventory.container.RepairContainer) CraftInventoryView(org.bukkit.craftbukkit.v.inventory.CraftInventoryView) PlayerEntityBridge(io.izzel.arclight.common.bridge.entity.player.PlayerEntityBridge) CraftInventoryAnvil(org.bukkit.craftbukkit.v.inventory.CraftInventoryAnvil)

Example 12 with CraftInventoryView

use of org.bukkit.craftbukkit.v.inventory.CraftInventoryView in project Arclight by IzzelAliz.

the class StonecutterContainerMixin method getBukkitView.

@Override
public CraftInventoryView getBukkitView() {
    if (bukkitEntity != null) {
        return bukkitEntity;
    }
    CraftInventoryStonecutter inventory = new CraftInventoryStonecutter(this.inputInventory, this.inventory);
    bukkitEntity = new CraftInventoryView(((PlayerEntityBridge) this.playerInventory.player).bridge$getBukkitEntity(), inventory, (Container) (Object) this);
    return bukkitEntity;
}
Also used : Container(net.minecraft.inventory.container.Container) StonecutterContainer(net.minecraft.inventory.container.StonecutterContainer) CraftInventoryView(org.bukkit.craftbukkit.v.inventory.CraftInventoryView) PlayerEntityBridge(io.izzel.arclight.common.bridge.entity.player.PlayerEntityBridge) CraftInventoryStonecutter(org.bukkit.craftbukkit.v.inventory.CraftInventoryStonecutter)

Example 13 with CraftInventoryView

use of org.bukkit.craftbukkit.v.inventory.CraftInventoryView in project Arclight by IzzelAliz.

the class WorkbenchContainerMixin method getBukkitView.

@Override
public CraftInventoryView getBukkitView() {
    if (bukkitEntity != null) {
        return bukkitEntity;
    }
    CraftInventoryCrafting inventory = new CraftInventoryCrafting(this.craftMatrix, this.craftResult);
    bukkitEntity = new CraftInventoryView(((PlayerEntityBridge) this.playerInventory.player).bridge$getBukkitEntity(), inventory, (Container) (Object) this);
    return bukkitEntity;
}
Also used : CraftInventoryCrafting(org.bukkit.craftbukkit.v.inventory.CraftInventoryCrafting) Container(net.minecraft.inventory.container.Container) WorkbenchContainer(net.minecraft.inventory.container.WorkbenchContainer) CraftInventoryView(org.bukkit.craftbukkit.v.inventory.CraftInventoryView) PlayerEntityBridge(io.izzel.arclight.common.bridge.entity.player.PlayerEntityBridge)

Example 14 with CraftInventoryView

use of org.bukkit.craftbukkit.v.inventory.CraftInventoryView in project Arclight by IzzelAliz.

the class GrindstoneContainerMixin method getBukkitView.

@Override
public CraftInventoryView getBukkitView() {
    if (bukkitEntity != null) {
        return bukkitEntity;
    }
    CraftInventoryGrindstone inventory = new CraftInventoryGrindstone(this.inputInventory, this.outputInventory);
    bukkitEntity = new CraftInventoryView(((PlayerEntityBridge) this.playerInventory.player).bridge$getBukkitEntity(), inventory, (Container) (Object) this);
    return bukkitEntity;
}
Also used : Container(net.minecraft.inventory.container.Container) GrindstoneContainer(net.minecraft.inventory.container.GrindstoneContainer) CraftInventoryView(org.bukkit.craftbukkit.v.inventory.CraftInventoryView) CraftInventoryGrindstone(org.bukkit.craftbukkit.v.inventory.CraftInventoryGrindstone) PlayerEntityBridge(io.izzel.arclight.common.bridge.entity.player.PlayerEntityBridge)

Example 15 with CraftInventoryView

use of org.bukkit.craftbukkit.v.inventory.CraftInventoryView in project Arclight by IzzelAliz.

the class LecternContainerMixin method getBukkitView.

@Override
public CraftInventoryView getBukkitView() {
    if (bukkitEntity != null) {
        return bukkitEntity;
    }
    CraftInventoryLectern inventory = new CraftInventoryLectern(this.lecternInventory);
    bukkitEntity = new CraftInventoryView(((ServerPlayerEntityBridge) this.playerInventory.player).bridge$getBukkitEntity(), inventory, (Container) (Object) this);
    return bukkitEntity;
}
Also used : Container(net.minecraft.inventory.container.Container) LecternContainer(net.minecraft.inventory.container.LecternContainer) CraftInventoryView(org.bukkit.craftbukkit.v.inventory.CraftInventoryView) CraftInventoryLectern(org.bukkit.craftbukkit.v.inventory.CraftInventoryLectern) ServerPlayerEntityBridge(io.izzel.arclight.common.bridge.entity.player.ServerPlayerEntityBridge)

Aggregations

Container (net.minecraft.inventory.container.Container)16 CraftInventoryView (org.bukkit.craftbukkit.v.inventory.CraftInventoryView)16 PlayerEntityBridge (io.izzel.arclight.common.bridge.entity.player.PlayerEntityBridge)14 CraftInventory (org.bukkit.craftbukkit.v.inventory.CraftInventory)6 ServerPlayerEntityBridge (io.izzel.arclight.common.bridge.entity.player.ServerPlayerEntityBridge)2 PlayerInventory (net.minecraft.entity.player.PlayerInventory)2 CraftInventoryCrafting (org.bukkit.craftbukkit.v.inventory.CraftInventoryCrafting)2 HashSet (java.util.HashSet)1 PlayerEntity (net.minecraft.entity.player.PlayerEntity)1 ServerPlayerEntity (net.minecraft.entity.player.ServerPlayerEntity)1 CraftResultInventory (net.minecraft.inventory.CraftResultInventory)1 DoubleSidedInventory (net.minecraft.inventory.DoubleSidedInventory)1 IInventory (net.minecraft.inventory.IInventory)1 AbstractFurnaceContainer (net.minecraft.inventory.container.AbstractFurnaceContainer)1 BeaconContainer (net.minecraft.inventory.container.BeaconContainer)1 BrewingStandContainer (net.minecraft.inventory.container.BrewingStandContainer)1 CartographyContainer (net.minecraft.inventory.container.CartographyContainer)1 ChestContainer (net.minecraft.inventory.container.ChestContainer)1 DispenserContainer (net.minecraft.inventory.container.DispenserContainer)1 EnchantmentContainer (net.minecraft.inventory.container.EnchantmentContainer)1