Examples of entityDropItem()


Examples of net.minecraft.entity.Entity.entityDropItem()

          if(target.isShearable(stack, entity.worldObj, (int)entity.posX, (int)entity.posY, (int)entity.posZ)) {
            ArrayList<ItemStack> drops = target.onSheared(stack, entity.worldObj, (int)entity.posX, (int)entity.posY, (int)entity.posZ, EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, stack));

            Random rand = new Random();
            for(ItemStack drop : drops) {
              EntityItem ent = entity.entityDropItem(drop, 1.0F);
              ent.motionY += rand.nextFloat() * 0.05F;
              ent.motionX += (rand.nextFloat() - rand.nextFloat()) * 0.1F;
              ent.motionZ += (rand.nextFloat() - rand.nextFloat()) * 0.1F;
            }

 
View Full Code Here

Examples of net.minecraft.entity.Entity.entityDropItem()

                        (int) entity.posZ,
                        EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, stack));

                Random rand = new Random();
                for (ItemStack drop : drops) {
                    EntityItem ent = entity.entityDropItem(drop, 1.0F);
                    ent.motionY += rand.nextFloat() * 0.05F;
                    ent.motionX += (rand.nextFloat() - rand.nextFloat()) * 0.1F;
                    ent.motionZ += (rand.nextFloat() - rand.nextFloat()) * 0.1F;
                }
                ElectricItemUtils.drainPlayerEnergy(playerClicking, ModuleManager.computeModularProperty(stack, SHEARING_ENERGY_CONSUMPTION));
View Full Code Here

Examples of net.minecraft.entity.Entity.entityDropItem()

                            (int) entity.posX, (int) entity.posY, (int) entity.posZ,
                            EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, this.shootingItem));

                    Random rand = new Random();
                    for (ItemStack drop : drops) {
                        EntityItem ent = entity.entityDropItem(drop, 1.0F);
                        ent.motionY += rand.nextFloat() * 0.05F;
                        ent.motionX += (rand.nextFloat() - rand.nextFloat()) * 0.1F;
                        ent.motionZ += (rand.nextFloat() - rand.nextFloat()) * 0.1F;
                    }
                }
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayerMP.entityDropItem()

                ItemStack[] inventory = player.inventory.mainInventory;
                for(int i = 0; i < inventory.length; i++) {
                    if(inventory[i] != null && inventory[i].getItem() instanceof ItemBackpackBase) {
                        counter++;
                        if(counter > ConfigurationBackpack.MAX_BACKPACK_AMOUNT) {
                            player.entityDropItem(inventory[i].copy(), 0);
                            inventory[i] = null;
                        }
                    }
                }
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.