Examples of IFluidBlock


Examples of net.minecraftforge.fluids.IFluidBlock

        return LAVA.copy();
      } else {
        return null;
      }
    } else if (bId instanceof IFluidBlock) {
      IFluidBlock block = (IFluidBlock) bId;
      return block.drain(world, x, y, z, true);
    }
    return null;
  }
View Full Code Here

Examples of net.minecraftforge.fluids.IFluidBlock

    {
      return new FluidStack(FluidRegistry.LAVA, FluidContainerRegistry.BUCKET_VOLUME);
    }
    else if(block instanceof IFluidBlock)
    {
      IFluidBlock fluid = (IFluidBlock)block;

      if(meta == 0)
      {
        return fluid.drain(world, x, y, z, false);
      }
    }

    return null;
  }
View Full Code Here

Examples of net.minecraftforge.fluids.IFluidBlock

    {
        Block block = world.getBlock(x, y, z);

        if (block instanceof IFluidBlock)
        {
            IFluidBlock fluidBlockHit = (IFluidBlock) block;
            Fluid fluidHit = FluidRegistry.lookupFluidForBlock(block);

            if (fluidHit != null)
            {
                if (fluidHit.getName().equalsIgnoreCase("oil"))
                {
                    FluidStack stack = fluidBlockHit.drain(world, x, y, z, doDrain);
                    return stack != null && stack.amount > 0;
                }
            }
        }
View Full Code Here

Examples of net.minecraftforge.fluids.IFluidBlock

          return new ItemStack(Items.lava_bucket);
        }
        return null;
      }
      if (block instanceof IFluidBlock) {
        IFluidBlock flBlock = (IFluidBlock) block;

        if (flBlock.canDrain(world, x, y, z)) {
          ItemStack stack = new ItemStack(Items.bucket);
          stack = FluidContainerRegistry.fillFluidContainer(flBlock.drain(world, x, y, z, false), stack);

          if (stack != null) {
            flBlock.drain(world, x, y, z, true);
            return stack;
          }
        }
      }
      return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.