Package net.minecraft.block.material

Examples of net.minecraft.block.material.Material


      int j = MathHelper.floor_double( this.posX );
      int i = MathHelper.floor_double( this.posY );
      int k = MathHelper.floor_double( this.posZ );

      Block blk = worldObj.getBlock( j, i, k );
      Material mat = blk.getMaterial();
      IGrowableCrystal cry = (IGrowableCrystal) is.getItem();

      float multiplier = cry.getMultiplier( blk, mat );
      int speed = (int) Math.max( 1, getSpeed( j, i, k ) * multiplier );

      boolean isClient = Platform.isClient();

      if ( mat.isLiquid() )
      {
        if ( isClient )
          progress_1000++;
        else
          progress_1000 += speed;
View Full Code Here


    int j = MathHelper.floor_double( this.posX );
    int i = MathHelper.floor_double( this.posY );
    int k = MathHelper.floor_double( this.posZ );

    Material mat = worldObj.getBlock( j, i, k ).getMaterial();
    if ( Platform.isServer() && mat.isLiquid() )
    {
      transformTime++;
      if ( transformTime > 60 )
      {
        if ( !transform() )
View Full Code Here

  }

  @Override
  public boolean shouldSideBeRendered(IBlockAccess w, int x, int y, int z, int side)
  {
    Material mat = w.getBlock( x, y, z ).getMaterial();
    if ( mat == Material.glass || mat == AEGlassMaterial.instance )
    {
      if ( w.getBlock( x, y, z ).getRenderType() == this.getRenderType() )
        return false;
    }
View Full Code Here

        Block blk = w.getBlock( x, y, z );

        IStorageGrid storage = proxy.getStorage();
        IEnergyGrid energy = proxy.getEnergy();

        Material mat = blk.getMaterial();
        boolean ignore = mat == Material.air || mat == Material.lava || mat == Material.water || mat.isLiquid() || blk == Blocks.bedrock
            || blk == Blocks.end_portal || blk == Blocks.end_portal_frame || blk == Blocks.command_block;

        if ( !ignore )
        {
          if ( !w.isAirBlock( x, y, z ) && w.blockExists( x, y, z ) && w.canMineBlock( Platform.getPlayer( w ), x, y, z ) )
View Full Code Here

    private boolean tryPlaceContainedLiquid(World world, int x, int y, int z) {
        if (fluid.getBlock() == null)
            return false;

        Material material = world.getBlock(x, y, z).getMaterial();

        if (!world.isAirBlock(x, y, z) && material.isSolid())
            return false;

        if (!world.isRemote && !material.isSolid() && !material.isLiquid())
            world.func_147480_a(x, y, z, true);

        Block block = fluid.getBlock();
        world.setBlock(x, y, z, block, block instanceof BlockFluidFinite ? 15 : 0, 3);
        return true;
View Full Code Here

                {
                    var33 = !validLocations[(xPos * 16 + zPos) * 8 + yPos] && (xPos < 15 && validLocations[((xPos + 1) * 16 + zPos) * 8 + yPos] || xPos > 0 && validLocations[((xPos - 1) * 16 + zPos) * 8 + yPos] || zPos < 15 && validLocations[(xPos * 16 + zPos + 1) * 8 + yPos] || zPos > 0 && validLocations[(xPos * 16 + (zPos - 1)) * 8 + yPos] || yPos < 7 && validLocations[(xPos * 16 + zPos) * 8 + yPos + 1] || yPos > 0 && validLocations[(xPos * 16 + zPos) * 8 + (yPos - 1)]);

                    if (var33)
                    {
                        Material var12 = world.getBlock(x + xPos, y + yPos, z + zPos).getMaterial();

                        if (yPos >= 4 && var12.isLiquid())
                        {
                            return false;
                        }

                        if (yPos < 4 && !var12.isSolid() && world.getBlock(x + xPos, y + yPos, z + zPos) != this.liquidBlock)
                        {
                            return false;
                        }
                    }
                }
View Full Code Here

    int x = MathHelper.floor_double(this.posX);
    int y = MathHelper.floor_double(this.posY);
    int z = MathHelper.floor_double(this.posZ);
    Block block = worldObj.getBlock(x, y, z);
   
    Material material = block.getMaterial();

    if ((material.isLiquid() || material.isSolid()) && block instanceof IFluidBlock) {
      double d0 = MathHelper.floor_double(this.posY) + 1 - ((IFluidBlock) block)
          .getFilledPercentage(worldObj, x, y, z);

      if (this.posY < d0) {
        this.setDead();
View Full Code Here

      }
    }
  }

  private boolean isBlocked(int x, int y, int z) {
    Material mat = worldObj.getBlock(x, y, z).getMaterial();

    return mat.blocksMovement();
  }
View Full Code Here

  }

  @Override
  public boolean canReplace(World world, int x, int y, int z) {
    Block block = world.getBlock(x, y, z);
    Material material = block.getMaterial();
    return (material.isReplaceable() && !material.isLiquid()) ||
        material == Material.air ||
        material == Material.plants;
  }
View Full Code Here

TOP

Related Classes of net.minecraft.block.material.Material

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.