Examples of canBeReplacedByLeaves()


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

                                    meta = 0;
                                }

                                Block block = world.getBlock(posX, posY, posZ);

                                if ((meta != 0 || y >= y + height - 1) && (block == null || block.canBeReplacedByLeaves(world, posX, posY, posZ)))
                                {
                                    world.setBlock(posX, posY, posZ, NContent.glowshroomPurple, meta, 0);
                                }
                            }
                        }
View Full Code Here

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

                    for (posY = 0; posY < height; ++posY)
                    {
                        Block block = world.getBlock(x, y + posY, z);
                        ;

                        if (block == null || block.canBeReplacedByLeaves(world, x, y + posY, z))
                        {
                            world.setBlock(x, y + posY, z, NContent.glowshroomPurple, 10, 0);
                        }
                    }
View Full Code Here

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

                    Block block = par1World.getBlock(var11, var8, var13);

                    if ((var12 >= 0 || var14 >= 0 || var12 * var12 + var14 * var14 <= var10 * var10) && (var12 <= 0 && var14 <= 0 || var12 * var12 + var14 * var14 <= (var10 + 1) * (var10 + 1))
                            && (par6Random.nextInt(4) != 0 || var12 * var12 + var14 * var14 <= (var10 - 1) * (var10 - 1))
                            && (block == null || block.canBeReplacedByLeaves(par1World, var11, var8, var13)))
                    {
                        this.setBlockAndNotifyAdequately(par1World, var11, var8, var13, NContent.floraLeaves, this.leavesMetadata);
                    }
                }
            }
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, random.nextInt(25) == 0 ? 2 : random.nextInt(15) == 0 ? 1 : 0);
                                    }
                                }
                            }
View Full Code Here

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

                                    meta = 0;
                                }

                                Block block = world.getBlock(posX, posY, posZ);

                                if ((meta != 0 || y >= y + height - 1) && (block == null || block.canBeReplacedByLeaves(world, posX, posY, posZ)))
                                {
                                    Block localID = type == 1 ? NContent.glowshroomBlue : NContent.glowshroomGreen;
                                    world.setBlock(posX, posY, posZ, localID, meta, 0);
                                }
                            }
View Full Code Here

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

                    for (posY = 0; posY < height; ++posY)
                    {
                        Block block = world.getBlock(x, y + posY, z);

                        if (block == null || block.canBeReplacedByLeaves(world, x, y + posY, z))
                        {
                            Block localID = type == 1 ? NContent.glowshroomBlue : NContent.glowshroomGreen;
                            world.setBlock(x, y + posY, z, localID, 10, 0);
                        }
                    }
View Full Code Here

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

                {
                    final int zDistanceFromTrunk = z1 - z;
                   
                    final Block block = world.getBlock(x1, y1, z1);
                   
                    if ((Math.abs(xDistanceFromTrunk) != radius || Math.abs(zDistanceFromTrunk) != radius || rand.nextInt(2) != 0 && canopyRow != 0) && (block == null || block.canBeReplacedByLeaves(world, x1, y1, z1)))
                    {
                        setBlockAndNotifyAdequately(world, x1, y1, z1, leaf, leafMeta);
                    }
                }
            }
View Full Code Here

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

        for (int z1 = z - canopyRadius; z1 <= z + canopyRadius; z1++) {
          final int zOnRadius = z1 - z;

          final Block block2 = world.getBlock(x1, y1, z1);

          if ((Math.abs(xOnRadius) != canopyRadius || Math.abs(zOnRadius) != canopyRadius || rand.nextInt(2) != 0 && posTrunk != 0) && (block2 == null || block2.canBeReplacedByLeaves(world, x1, y1, z1))) {
            world.setBlock(x1, y1, z1, Blocks.leaves);
          }
        }
      }
    }
View Full Code Here

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

                {
                    final int i5 = l4 - z;
                   
                    final Block block = world.getBlock(i4, k3, l4);
                   
                    if ((Math.abs(k4) != l1 || Math.abs(i5) != l1 || l1 <= 0) && (block == null || block.canBeReplacedByLeaves(world, i4, k3, l4)))
                    {
                        setBlockAndNotifyAdequately(world, i4, k3, l4, TreeBlock.LEAVES.getBlock(), TreeBlock.LEAVES.getMetadata());
                    }
                }
            }
View Full Code Here

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

            {
                final Block block = world.getBlock((int) (x1 + x), (int) y, (int) (z1 + z));
               
                if ((((x1 * x1) + (z1 * z1)) <= maxDist) && (((x1 * x1) + (z1 * z1)) >= minDist))
                {
                    if (block == null || block.canBeReplacedByLeaves(world, (int) (x1 + x), (int) y, (int) (z1 + z)))
                    {
                        if (rand.nextInt(skipChance) != 0)
                        {
                            setLeafBlock(world, (int) (x1 + x), (int) y, (int) (z1 + z), leaves);
                        }
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.