Package tconstruct.mechworks.logic

Examples of tconstruct.mechworks.logic.TileEntityLandmine


        if (world.getBlock(x, y, z) == TinkerMechworks.landmine)
        {
            TinkerMechworks.landmine.onBlockPlacedBy(world, x, y, z, player, stack);

            TileEntityLandmine te = (TileEntityLandmine) world.getTileEntity(x, y, z);
            if (te == null)
            {
                te = (TileEntityLandmine) TinkerMechworks.landmine.createTileEntity(world, metadata);
            }
View Full Code Here


        if (item == null || item.stackSize <= 0)
        {
            return;
        }

        TileEntityLandmine tileEntity = (TileEntityLandmine) par1World.getTileEntity(x, y, z);

        while (item.stackSize > 0)
        {
            boolean hasRemovedThisIteration = false;
            for (int i = 0; i < tileEntity.getSizeTriggerInventory(); i++)
            {
                if (!hasRemovedThisIteration && tileEntity.getStackInSlot(i) != null)
                {
                    if (tileEntity.getStackInSlot(i).isItemEqual(item))
                    {
                        tileEntity.decrStackSize(i, 1);
                        item.stackSize--;
                    }
                }

                if (!hasRemovedThisIteration && i == tileEntity.getSizeTriggerInventory() - 1)
                {
                    item.stackSize--;
                }
            }
        }
View Full Code Here

TOP

Related Classes of tconstruct.mechworks.logic.TileEntityLandmine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.