Examples of dropBlockAsItemWithChance()


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

                        continue;
                    }

                    //With our change to how snowballs are dropped this needs to disallow to mimic vanilla behavior.
                    float chance = (i2 instanceof BlockSnow ? -1.0f : 1.0f);
                    i2.dropBlockAsItemWithChance(par1World, newX, newY, newZ, par1World.getBlockMetadata(newX, newY, newZ), chance, 0);
                    par1World.setBlockToAir(newX, newY, newZ);
                }
            }

            l1 = newX;
View Full Code Here

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

                    if(!breakEvent.isCanceled())
                    {
                        if (block.canDropFromExplosion(this))
                        {
                            block.dropBlockAsItemWithChance(worldObj, i, j, k, worldObj.getBlockMetadata(i, j, k), 1.0F / explosionSize, 0);
                        }

                        block.onBlockExploded(worldObj, i, j, k, this);
                        affectedBlockPositions.add(chunkposition);
                    }
View Full Code Here

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

              {
                if ( block.getMaterial() != Material.air )
                {
                  if ( block.canDropFromExplosion( ex ) )
                  {
                    block.dropBlockAsItemWithChance( this.worldObj, x, y, z, this.worldObj.getBlockMetadata( x, y, z ), 1.0F / 1.0f, 0 );
                  }

                  block.onBlockExploded( this.worldObj, x, y, z, ex );
                }
              }
View Full Code Here

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

                {
                    Block block = l;

                    if (block.canDropFromExplosion(this))
                    {
                        block.dropBlockAsItemWithChance(this.world, i, j, k, this.world.getBlockMetadata(i, j, k), 1.0F, 0);
                    }

                    block.onBlockExploded(this.world, i, j, k, this);
                }
            }
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.