Package net.minecraftforge.fluids

Examples of net.minecraftforge.fluids.IFluidTank


        int tankIdx = getExposedTankFromSide(direction.ordinal());
        if(tankIdx == FLUIDTANK_NONE) {
          return null;
        }
       
        IFluidTank t = tanks[tankIdx];
        if(type == null || isFluidValidForTank(tankIdx, type)) {
          return t;
        }
       
        return null;
View Full Code Here


        tankIdx = getExposedTankFromSide(from.ordinal());
      }

      if(tankIdx == FLUIDTANK_NONE) { return false; }

      IFluidTank tank = tanks[tankIdx];
      if(tank.getFluidAmount() <= 0) {
        return true;
      }
      else {
        return tank.getFluid().fluidID == fluid.getID();
      }
    }
View Full Code Here

        tankIdx = getExposedTankFromSide(from.ordinal());
      }

      if(tankIdx == FLUIDTANK_NONE) { return false; }

      IFluidTank tank = tanks[tankIdx];
      if(tank.getFluidAmount() <= 0) {
        return false;
      }
      else {
        return tank.getFluid().fluidID == fluid.getID();
      }
    }
View Full Code Here

        int x = (int) (Math.floor(cart.posX));
        int y = (int) (Math.floor(cart.posY));
        int z = (int) (Math.floor(cart.posZ));

        IFluidTank tank = cartTank.getTankManager().get(0);
        FluidStack fluidStack = tank.getFluid();
        if (fluidStack != null && fluidStack.amount > 0) {
            Fluid fluid = fluidStack.getFluid();
            int[] displayLists = FluidRenderer.getLiquidDisplayLists(fluidStack);
            if (fluid != null && displayLists != null) {
                GL11.glPushMatrix();

                GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
                GL11.glEnable(GL11.GL_BLEND);

                GL11.glTranslatef(0, 0.0625f, 0);

                float cap = tank.getCapacity();
                float level = (float) Math.min(fluidStack.amount, cap) / cap;

                renderer.bindTex(FluidRenderer.getFluidSheet(fluidStack));
                FluidRenderer.setColorForFluidStack(fluidStack);
                GL11.glCallList(displayLists[(int) (level * (float) (FluidRenderer.DISPLAY_STAGES - 1))]);
View Full Code Here

        RenderFakeBlock.renderBlock(backDrop, base.getWorld(), x, y, z, false, true);

        GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F);
        GL11.glScalef(1f, 0.6f, 1f);

        IFluidTank tank = base.getTankManager().get(0);

        FluidStack fluidStack = tank.getFluid();
        if (fluidStack != null && fluidStack.amount > 0) {
            int[] displayLists = FluidRenderer.getLiquidDisplayLists(fluidStack);
            if (displayLists != null) {
                GL11.glPushMatrix();

                if (FluidRenderer.getFluidTexture(fluidStack, false) != null) {

                    float cap = tank.getCapacity();
                    float level = (float) Math.min(fluidStack.amount, cap) / cap;

                    bindTexture(FluidRenderer.getFluidSheet(fluidStack));
                    FluidRenderer.setColorForFluidStack(fluidStack);
                    GL11.glCallList(displayLists[(int) (level * (float) (FluidRenderer.DISPLAY_STAGES - 1))]);
View Full Code Here

TOP

Related Classes of net.minecraftforge.fluids.IFluidTank

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.