Package net.minecraft.block

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


                        {
                            setBlockAndNotifyAdequately(world, x1, y1, z1, TreeBlock.LEAVES.getBlock(), TreeBlock.LEAVES.getMetadata());
                        }
                       
                        block = world.getBlock(x1 - 1, y1, z1);
                        if (block.isAir(world, x1 - 1, y1, z1) || block.canBeReplacedByLeaves(world, x1 - 1, y1, z1))
                        {
                            setBlockAndNotifyAdequately(world, x1 - 1, y1, z1, TreeBlock.LEAVES.getBlock(), TreeBlock.LEAVES.getMetadata());
                        }
                       
                        block = world.getBlock(x1, y1, z1 - 1);
View Full Code Here


                        {
                            setBlockAndNotifyAdequately(world, x1 - 1, y1, z1, TreeBlock.LEAVES.getBlock(), TreeBlock.LEAVES.getMetadata());
                        }
                       
                        block = world.getBlock(x1, y1, z1 - 1);
                        if (block.isAir(world, x1, y1, z1 - 1) || block.canBeReplacedByLeaves(world, x1, y1, z1 - 1))
                        {
                            setBlockAndNotifyAdequately(world, x1, y1, z1 - 1, TreeBlock.LEAVES.getBlock(), TreeBlock.LEAVES.getMetadata());
                        }
                       
                        block = world.getBlock(x1 - 1, y1, z1 - 1);
View Full Code Here

                        {
                            setBlockAndNotifyAdequately(world, x1, y1, z1 - 1, TreeBlock.LEAVES.getBlock(), TreeBlock.LEAVES.getMetadata());
                        }
                       
                        block = world.getBlock(x1 - 1, y1, z1 - 1);
                        if (block.isAir(world, x1 - 1, y1, z1 - 1) || block.canBeReplacedByLeaves(world, x1 - 1, y1, z1 - 1))
                        {
                            setBlockAndNotifyAdequately(world, x1 - 1, y1, z1 - 1, TreeBlock.LEAVES.getBlock(), TreeBlock.LEAVES.getMetadata());
                        }
                    }
                }
View Full Code Here

        }
       
        for (int y1 = y - 1; y1 > 1; y1--)
        {
            Block block = world.getBlock(x, y1, z);
            if (block != null && !block.canBeReplacedByLeaves(world, x, y1, z))
                break;
           
            // If there is an air block here place a root log
            setBlockAndNotifyAdequately(world, x, y1, z, logBlock, logs.getItemDamage());
        }
View Full Code Here

                int x2 = (int) (x1 + x);
                int z2 = (int) (z1 + z);
               
                final Block block = world.getBlock(x2, y, z2);
               
                if ((((x1 * x1) + (z1 * z1)) <= dist) && (block == null || block.canBeReplacedByLeaves(world, x2, y, z2)))
                {
                    setLeafBlock(world, x2, y, z2, leaves);
                }
            }
        }
View Full Code Here

                {
                    final int zOnRadius = z1 - z;
                   
                    final Block block = world.getBlock(x1, y1, z1);
                   
                    if ((Math.abs(xOnRadius) != canopyRadius || Math.abs(zOnRadius) != canopyRadius || rand.nextInt(2) != 0 && distanceFromTop != 0) && (block == null || block.canBeReplacedByLeaves(world, x1, y1, z1)))
                    {
                        setBlockAndNotifyAdequately(world, x1, y1, z1, TreeBlock.LEAVES.getBlock(), TreeBlock.LEAVES.getMetadata());
                    }
                }
            }
View Full Code Here

                    {
                        ++var13;
                    }
                    else
                    {
                        if (block == null || block.canBeReplacedByLeaves(world, var11[0], var11[1], var11[2]))
                        {
                            setBlockAndNotifyAdequately(world, var11[0], var11[1], var11[2], leafBlock, leafBlockMeta);
                        }
                       
                        ++var13;
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.