Package tconstruct.smeltery.logic

Examples of tconstruct.smeltery.logic.SmelteryLogic


    @Override
    public List<String> getWailaBody (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
    {
        if (accessor.getTileEntity() instanceof SmelteryLogic && config.getConfig("tcon.smeltery", true))
        {
            SmelteryLogic te = (SmelteryLogic) accessor.getTileEntity();
            if (te.validStructure)
            {
                List<FluidStack> fls = te.moltenMetal;
                if (fls.size() <= 0)
                {
View Full Code Here


    }

    public boolean renderSmeltery (IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer)
    {
        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++)
                {
                    renderLayer(logic, i * logic.getBlocksPerLayer(), from, to, from.y + i, renderer, world);
                }
            }

            //Liquids
            float base = 0F;
            int yBase = 0;
            int liquidBase = 0;
            for (FluidStack liquid : logic.moltenMetal)
            {
                int liquidSize = liquid.amount;
                while (liquidSize > 0)
                {
                    int cap = logic.getCapacityPerLayer();
                    int room = cap - liquidBase;
                    int countSize = liquidSize > room ? room : liquidSize;
                    liquidSize -= countSize;

                    float height = countSize > cap ? 1.0F : (float) countSize / (float) cap;
View Full Code Here

TOP

Related Classes of tconstruct.smeltery.logic.SmelteryLogic

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.