Examples of canBeReplacedByLeaves()


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

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

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

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

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

                        {
                            setBlockandMetadataIfChunkExists(world, i4, k3, l4, TreeBlock.LEAVES.getBlock(), TreeBlock.LEAVES.getMetadata());
                        }
                       
                        block = world.getBlock(i4 - 1, k3, l4);
                        if (block.isAir(world, i4 - 1, k3, l4) || block.canBeReplacedByLeaves(world, i4 - 1, k3, l4))
                        {
                            setBlockandMetadataIfChunkExists(world, i4 - 1, k3, l4, TreeBlock.LEAVES.getBlock(), TreeBlock.LEAVES.getMetadata());
                        }
                       
                        block = world.getBlock(i4, k3, l4 - 1);
View Full Code Here

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

                        {
                            setBlockandMetadataIfChunkExists(world, i4 - 1, k3, l4, TreeBlock.LEAVES.getBlock(), TreeBlock.LEAVES.getMetadata());
                        }
                       
                        block = world.getBlock(i4, k3, l4 - 1);
                        if (block.isAir(world, i4, k3, l4 - 1) || block.canBeReplacedByLeaves(world, i4, k3, l4 - 1))
                        {
                            setBlockandMetadataIfChunkExists(world, i4, k3, l4 - 1, TreeBlock.LEAVES.getBlock(), TreeBlock.LEAVES.getMetadata());
                        }
                       
                        block = world.getBlock(i4 - 1, k3, l4 - 1);
View Full Code Here

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

                        {
                            setBlockandMetadataIfChunkExists(world, i4, k3, l4 - 1, TreeBlock.LEAVES.getBlock(), TreeBlock.LEAVES.getMetadata());
                        }
                       
                        block = world.getBlock(i4 - 1, k3, l4 - 1);
                        if (block.isAir(world, i4 - 1, k3, l4 - 1) || block.canBeReplacedByLeaves(world, i4 - 1, k3, l4 - 1))
                        {
                            setBlockandMetadataIfChunkExists(world, i4 - 1, k3, l4 - 1, TreeBlock.LEAVES.getBlock(), TreeBlock.LEAVES.getMetadata());
                        }
                    }
                }
View Full Code Here

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

                Block block;
                if (((Math.abs(i) != 3) || (Math.abs(j) != 3)) && ((Math.abs(i) != 2) || (Math.abs(j) != 3)) && ((Math.abs(i) != 3) || (Math.abs(j) != 2)))
                {
                    block = world.getBlock(x + i, y, z + j);
                    if(block == null || block.canBeReplacedByLeaves(world, x + i, y, z + j))
                    {
                        setBlockAndNotifyAdequately(world, x + i, y, z + j, TreeBlock.LEAVES.getBlock(), TreeBlock.LEAVES.getMetadata());
                    }
                }
View Full Code Here

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

                if ((Math.abs(i) >= 3) || (Math.abs(j) >= 3) || ((Math.abs(i) == 2) && (Math.abs(j) == 2)))
                    continue;

                block = world.getBlock(x + i, y + 1, z + j);
                if(block == null || block.canBeReplacedByLeaves(world, x + i, y + 1, z + j))
                {
                    setBlockAndNotifyAdequately(world, x + i, y + 1, z + j, TreeBlock.LEAVES.getBlock(), TreeBlock.LEAVES.getMetadata());
                }

                block = world.getBlock(x + i, y - 1, z + j);
View Full Code Here

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

                {
                    setBlockAndNotifyAdequately(world, x + i, y + 1, z + j, TreeBlock.LEAVES.getBlock(), TreeBlock.LEAVES.getMetadata());
                }

                block = world.getBlock(x + i, y - 1, z + j);
                if(block == null || block.canBeReplacedByLeaves(world, x + i, y - 1, z + j))
                {
                    setBlockAndNotifyAdequately(world, x + i, y - 1, z + j, TreeBlock.LEAVES.getBlock(), TreeBlock.LEAVES.getMetadata());
                }
            }
        }
View Full Code Here

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

                    final int i5 = z1 - z;
                   
                    if (Math.abs(k4) != l1 || Math.abs(i5) != l1 || l1 <= 0)
                    {
                        Block block = world.getBlock(x1, y1, z1);
                        if (block.isAir(world, x1, y1, z1) || block.canBeReplacedByLeaves(world, x1, y1, z1))
                        {
                            setBlockAndNotifyAdequately(world, x1, y1, z1, TreeBlock.LEAVES.getBlock(), TreeBlock.LEAVES.getMetadata());
                        }
                       
                        block = world.getBlock(x1 - 1, y1, z1);
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.