Package mantle.world

Examples of mantle.world.CoordTuple


        worldObj.func_147479_m(xCoord, yCoord, zCoord);
    }

    public int comparatorStrength ()
    {
        CoordTuple master = this.getMasterPosition();
        SmelteryLogic smeltery = (SmelteryLogic) worldObj.getTileEntity(master.x, master.y, master.z);
        return 15 * smeltery.currentLiquid / smeltery.maxLiquid;
    }
View Full Code Here


    {
        /*
         * if (master != null) //Is this even needed? return false;
         */

        master = new CoordTuple(xMaster, yMaster, zMaster);
        return true;
    }
View Full Code Here

        super.markDirty();
    }

    void updateWorldBlock (int slot, ItemStack itemstack)
    {
        CoordTuple air = structure.getAirByIndex(slot);
        if (air != null)
        {
            TileEntity te = worldObj.getTileEntity(air.x, air.y, air.z);
            if (te != null && te instanceof TankAirLogic)
            {
View Full Code Here

            // Calculate where to distribute liquids
            for (int i = 0; i < structure.airCoords.size(); i++)
            {
                LiquidDataInstance instance;
                CoordTuple coord = structure.airCoords.get(i);
                int height = 16 * (coord.y - baseY);
                int position = i % layerSize;

                if (!airUpdates.containsKey(coord))
                {
View Full Code Here

        Iterator iter = airUpdates.entrySet().iterator();
        byte count = 0;
        while (iter.hasNext() && count < 40)
        {
            Map.Entry pairs = (Map.Entry) iter.next();
            CoordTuple coord = (CoordTuple) pairs.getKey();
            TileEntity te = worldObj.getTileEntity(coord.x, coord.y, coord.z);
            if (te instanceof TankAirLogic)
            {
                ((TankAirLogic) te).overrideFluids(((LiquidDataInstance) pairs.getValue()).fluids);
            }
View Full Code Here

        int neededBricks = (xMax + 1 - xMin) * (zMax + 1 - zMin); // +1 because we want inclusive the upper bound

        if (bottomBricks == neededBricks)
        {
            tempValidStructure = true;
            minPos = new CoordTuple(xMin, y + 1, zMin);
            maxPos = new CoordTuple(xMax, y + 1, zMax);
        }
        return count;
    }
View Full Code Here

                    tempBricks++;
                }

                if (te instanceof LavaTankLogic)
                {
                    lavaTanks.add(new CoordTuple(x, y, z));
                }
            }
        }
        return tempBricks;
    }
View Full Code Here

    public void readFromNBT (NBTTagCompound tags)
    {
        layers = tags.getInteger("Layers");
        int[] pos = tags.getIntArray("MinPos");
        if (pos.length > 2)
            minPos = new CoordTuple(pos[0], pos[1], pos[2]);
        else
            minPos = new CoordTuple(xCoord, yCoord, zCoord);

        pos = tags.getIntArray("MaxPos");
        if (pos.length > 2)
            maxPos = new CoordTuple(pos[0], pos[1], pos[2]);
        else
            maxPos = new CoordTuple(xCoord, yCoord, zCoord);

        maxBlockCapacity = getBlocksPerLayer() * layers;
        inventory = new ItemStack[maxBlockCapacity];
        super.readFromNBT(tags);

View Full Code Here

    {
        renderer.renderStandardBlock(block, x, y, z);
        SmelteryLogic logic = (SmelteryLogic) world.getTileEntity(x, y, z);
        if (logic.validStructure)
        {
            CoordTuple from = logic.minPos;
            CoordTuple to = logic.maxPos;

            //Melting
            if (logic.getSizeInventory() > 0)
            {
                for (int i = 0; i < logic.layers; i++)
View Full Code Here

            {
                boolean foundTank = false;
                int iter = 0;
                while (!foundTank)
                {
                    CoordTuple possibleTank = structure.lavaTanks.get(iter);
                    TileEntity newTankContainer = world.getTileEntity(possibleTank.x, possibleTank.y, possibleTank.z);
                    if (newTankContainer instanceof IFluidHandler)
                    {
                        FluidStack newliquid = ((IFluidHandler) newTankContainer).drain(ForgeDirection.UNKNOWN, drainFuelAmount(), false);
                        if (newliquid != null && newliquid.getFluid().getBlock() == Blocks.lava && newliquid.amount > 0)
View Full Code Here

TOP

Related Classes of mantle.world.CoordTuple

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.