Package net.minecraft.src.buildcraft.core

Examples of net.minecraft.src.buildcraft.core.StackUtil


            Position newItemPos = getNewItemPos(destPos, newPos, Utils.getPipeFloorOf(item.item));
            item.setPosition(newItemPos.x, newItemPos.y, newItemPos.z);
            ((IPipeEntry) tile).entityEntering(item, newPos);
        }
        else if (tile instanceof IInventory) {
            StackUtil utils = new StackUtil(item.item);

            if (!APIProxy.isClient(worldObj)) {
                if (utils.checkAvailableSlot((IInventory) tile, true, destPos.orientation.reverse()) && utils.items.stackSize == 0) {
                    idsToRemove.add(item.entityId);
                    ((PipeTransportItems) this.transport).scheduleRemoval(item);
                    // Do nothing, we're adding the object to the world
                }
                else {
View Full Code Here


        else if (entity instanceof TileGenericPipe) {
            TileGenericPipe pipe = (TileGenericPipe) entity;
            return pipe.pipe.transport instanceof PipeTransportItems;
        }
        else if (entity instanceof IInventory) {
            if (new StackUtil(item.item).checkAvailableSlot((IInventory) entity,
                    false, p.orientation.reverse())) {
                return true;
            }
        }
View Full Code Here

                newPos.moveForwards(1.0);

                TileEntity entity = worldObj.getBlockTileEntity((int) newPos.x, (int) newPos.y, (int) newPos.z);

                if (entity instanceof IInventory) {
                    if (new StackUtil(item.item).checkAvailableSlot((IInventory) entity, false, newPos.orientation.reverse())) {
                        newOris.add(newPos.orientation);
                    }
                }
            }
        }


        //System.out.println("NewOris Size: " + newOris.size() + " - PO Size: " + possibleOrientations.size() + " - Level: " + Level);
        if (newOris.size() > 0) {
            Position destPos =  new Position(pos.x, pos.y, pos.z, newOris.get( (new Random()) .nextInt(newOris.size()) ) );
            destPos.moveForwards(1.0);
            StackUtil utils = new StackUtil(item.item);
            TileEntity tile = worldObj.getBlockTileEntity((int) destPos.x, (int) destPos.y, (int) destPos.z);

            if (!APIProxy.isClient(worldObj)) {
                if (utils.checkAvailableSlot((IInventory) tile, true, destPos.orientation.reverse()) && utils.items.stackSize == 0) {
                    item.remove();
                    ((PipeTransportItems) this.transport).scheduleRemoval(item);
                }
                else {
                    item.item = utils.items;
View Full Code Here

TOP

Related Classes of net.minecraft.src.buildcraft.core.StackUtil

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.