Search in sources :

Example 1 with ItemTicket

use of mods.railcraft.common.items.ItemTicket in project Railcraft by Railcraft.

the class EntityLocomotive method processTicket.

private void processTicket() {
    IInventory invTicket = getTicketInventory();
    ItemStack stack = invTicket.getStackInSlot(0);
    if (stack != null)
        if (stack.getItem() instanceof ItemTicket) {
            if (setDestination(stack))
                invTicket.setInventorySlotContents(0, InvTools.depleteItem(stack));
        } else
            invTicket.setInventorySlotContents(0, null);
}
Also used : IInventory(net.minecraft.inventory.IInventory) ItemTicket(mods.railcraft.common.items.ItemTicket) ItemStack(net.minecraft.item.ItemStack)

Aggregations

ItemTicket (mods.railcraft.common.items.ItemTicket)1 IInventory (net.minecraft.inventory.IInventory)1 ItemStack (net.minecraft.item.ItemStack)1