Examples of canBeReplacedByLeaves()


Examples of net.minecraft.block.Block.canBeReplacedByLeaves()

      if (--y <= 0) {
        break;
      }
      block = world.getBlock(x, y, z);
    } while (block.isAir(world, x, y, z) || block.isReplaceable(world, x, y, z) || block.isLeaves(world, x, y, z)
        || block.isFoliage(world, x, y, z) || block.canBeReplacedByLeaves(world, x, y, z));
    return y;
  }

  public static int getTopBlockY(World world, int x, int z) {
View Full Code Here

Examples of net.minecraft.block.Block.canBeReplacedByLeaves()

                            {
                                int l2 = k2 - z;

                                block = world.getBlock(l1, j2, k2);

                                if ((Math.abs(i2) != k1 || Math.abs(l2) != k1 || par2Random.nextInt(2) != 0 && j1 != 0) && (block == null || block.canBeReplacedByLeaves(world, l1, j2, k2)))
                                {
                                    this.setBlockAndNotifyAdequately(world, l1, j2, k2, NContent.floraLeavesNoColor, 3);
                                }
                            }
                        }
View Full Code Here

Examples of net.minecraft.block.Block.canBeReplacedByLeaves()

                    if (Math.abs(k2) != i2 || Math.abs(i3) != i2 || random.nextInt(2) != 0 && k1 != 0)
                    {
                        Block block = world.getBlock(x, y, z);

                        if (block == null || block.canBeReplacedByLeaves(world, x, y, z))
                        {
                            this.setBlockAndNotifyAdequately(world, x, y, z, NContent.rareLeaves, this.metaLeaves);
                        }
                    }
                }
View Full Code Here

Examples of net.minecraft.block.Block.canBeReplacedByLeaves()

                                if (Math.abs(k2) != i2 || Math.abs(i3) != i2 || random.nextInt(2) != 0 && k1 != 0)
                                {
                                    Block block = world.getBlock(j2, j1, l2);

                                    if (block == null || block.canBeReplacedByLeaves(world, j2, j1, l2))
                                    {
                                        this.setBlockAndNotifyAdequately(world, j2, j1, l2, NContent.darkLeaves, 3);
                                    }
                                }
                            }
View Full Code Here

Examples of net.minecraft.block.Block.canBeReplacedByLeaves()

                block = Block.blocksList[blockId];

                if(block != null && !(block.isLeaves(world, xOffset, yOffset, zOffset) ||
                    block.isAirBlock(world, xOffset, yOffset, zOffset) ||
                    block.canBeReplacedByLeaves(world, xOffset, yOffset, zOffset)))
                {
                  return false;
                }
              }
            }
View Full Code Here

Examples of net.minecraft.block.Block.canBeReplacedByLeaves()

              if(((xPos != center | zPos != center) ||
                  rand.nextInt(2) != 0 && var12 != 0) &&
                  (block == null || block.isLeaves(world, xOffset, yOffset, zOffset) ||
                  block.isAirBlock(world, xOffset, yOffset, zOffset) ||
                  block.canBeReplacedByLeaves(world, xOffset, yOffset, zOffset)))
              {
                this.setBlockAndMetadata(world, xOffset, yOffset, zOffset,
                    MineFactoryReloadedCore.rubberLeavesBlock.blockID, 0);
              }
            }
View Full Code Here

Examples of net.minecraft.block.Block.canBeReplacedByLeaves()

                                {
                                    final int var17 = var16 - par5;

                                    final Block block = par1World.getBlock(var14, var11, var16);

                                    if ((Math.abs(var15) != var13 || Math.abs(var17) != var13 || par2Random.nextInt(2) != 0 && var12 != 0) && (block == null || block.canBeReplacedByLeaves(par1World, var14, var11, var16)))
                                    {
                                        this.setBlockAndNotifyAdequately(par1World, var14, var11, var16, Blocks.leaves, this.metaLeaves);
                                    }
                                }
                            }
View Full Code Here

Examples of net.minecraft.block.Block.canBeReplacedByLeaves()

                                if (Math.abs(k2) != i2 || Math.abs(i3) != i2 || par2Random.nextInt(2) != 0 && k1 != 0)
                                {
                                    Block block = par1World.getBlock(j2, j1, l2);

                                    if (block == null || block.canBeReplacedByLeaves(par1World, j2, j1, l2))
                                    {
                                        this.setBlockAndNotifyAdequately(par1World, j2, j1, l2, Blocks.leaves, this.metaLeaves);
                                    }
                                }
                            }
View Full Code Here

Examples of net.minecraft.block.Block.canBeReplacedByLeaves()

                            {
                                final int var15 = var14 - par5;

                                final Block block = par1World.getBlock(var12, var16, var14);

                                if ((Math.abs(var13) != var11 || Math.abs(var15) != var11 || par2Random.nextInt(2) != 0 && var10 != 0) && (block == null || block.canBeReplacedByLeaves(par1World, var12, var16, var14)))
                                {
                                    this.setBlockAndNotifyAdequately(par1World, var12, var16, var14, Blocks.leaves, 2);
                                }
                            }
                        }
View Full Code Here

Examples of net.minecraft.block.Block.canBeReplacedByLeaves()

                                {
                                    final int var20 = var19 - par5;

                                    final Block block = par1World.getBlock(var17, var16, var19);

                                    if ((Math.abs(var18) != var21 || Math.abs(var20) != var21 || var21 <= 0) && (block == null || block.canBeReplacedByLeaves(par1World, var17, var16, var19)))
                                    {
                                        this.setBlockAndNotifyAdequately(par1World, var17, var16, var19, Blocks.leaves, 1);
                                    }
                                }
                            }
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.