Search in sources :

Example 1 with ContainerKnapping

use of net.dries007.tfc.objects.container.ContainerKnapping in project firmalife by eerussianguy.

the class FLGuiHandler method getServerGuiElement.

@Override
public Container getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
    BlockPos pos = new BlockPos(x, y, z);
    ItemStack stack = player.getHeldItemMainhand();
    Type type = Type.valueOf(ID);
    switch(type) {
        case KNAPPING_PUMPKIN:
            return new ContainerKnapping(KnappingFL.PUMPKIN, player.inventory, stack.getItem() == Item.getItemFromBlock(BlocksFL.PUMPKIN_FRUIT) ? stack : player.getHeldItemOffhand());
        default:
            return null;
    }
}
Also used : KnappingType(net.dries007.tfc.api.recipes.knapping.KnappingType) BlockPos(net.minecraft.util.math.BlockPos) ContainerKnapping(net.dries007.tfc.objects.container.ContainerKnapping) ItemStack(net.minecraft.item.ItemStack)

Aggregations

KnappingType (net.dries007.tfc.api.recipes.knapping.KnappingType)1 ContainerKnapping (net.dries007.tfc.objects.container.ContainerKnapping)1 ItemStack (net.minecraft.item.ItemStack)1 BlockPos (net.minecraft.util.math.BlockPos)1