Examples of dropPlayerItemWithRandomChoice()


Examples of net.minecraft.entity.player.EntityPlayer.dropPlayerItemWithRandomChoice()

      if(this.type == EnumBeeType.QUEEN)
        bee.mate(bee);
     
      ItemStack beestack = PluginApiculture.beeInterface.getMemberStack(bee, type.ordinal());
      player.dropPlayerItemWithRandomChoice(beestack, true);
      func_152373_a(sender, this, "Player %s was given a %s bee.", player.getCommandSenderName(), ((IAlleleSpecies) template[0]).getName());
    } else
      throw new WrongUsageException("/" + getCommandName() + " <player-name> <species-name>");
  }
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayer.dropPlayerItemWithRandomChoice()

      float f2 = RandomUtils.getFloat((float)Math.PI * 2.0F);
      item.motionX = -MathHelper.sin(f2) * f1;
      item.motionY = 0.2;
      item.motionZ =  MathHelper.cos(f2) * f1;
      return item;
    } else item = player.dropPlayerItemWithRandomChoice(stack, true);
    if (item != null) {
      item.motionX *= speed / 4;
      item.motionZ *= speed / 4;
    }
    return item;
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayer.dropPlayerItemWithRandomChoice()

        for (int x = 0; x < real.getSizeInventory(); x++)
        {
          ItemStack failed = playerInv.addItems( real.getStackInSlot( x ) );
          if ( failed != null )
            p.dropPlayerItemWithRandomChoice( failed, false );
        }

        inv.addItems( is );
        if ( p instanceof EntityPlayerMP )
          updateHeld( (EntityPlayerMP) p );
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayer.dropPlayerItemWithRandomChoice()

                if (EntityCartTank.getFilterFromCartItem(result) != null)
                    for (int i = 0; i < craftMatrix.getSizeInventory(); i++) {
                        ItemStack stack = craftMatrix.getStackInSlot(i);
                        if (stack != null && FluidHelper.isContainer(stack)) {
                            if (!player.inventory.addItemStackToInventory(stack))
                                player.dropPlayerItemWithRandomChoice(stack, false);
                            craftMatrix.setInventorySlotContents(i, null);
                        }
                    }
                return;
            }
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayer.dropPlayerItemWithRandomChoice()

            if (count == 1 && EnumCart.getCartType(result) == EnumCart.BASIC) {
                ItemStack contents = EnumCart.getCartType(cartItem).getContents();
                if (contents != null)
                    if (!player.inventory.addItemStackToInventory(contents))
                        player.dropPlayerItemWithRandomChoice(contents, false);
            }
        }
    }

}
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayer.dropPlayerItemWithRandomChoice()

                    while(itemStack.stackSize > 0) {
                        ItemStack remainingItem = itemStack.onFoodEaten(player.worldObj, player);
                        remainingItem = ForgeEventFactory.onItemUseFinish(player, itemStack, 0, remainingItem);
                        if(remainingItem != null && remainingItem.stackSize > 0 && (remainingItem != itemStack || remainingItem.stackSize != startValue)) {
                            if(!player.inventory.addItemStackToInventory(remainingItem)) {
                                player.dropPlayerItemWithRandomChoice(remainingItem, false);
                            }
                        }
                        if(itemStack.stackSize == startValue) break;
                    }
                }
View Full Code Here

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

            if (!world.isRemote && entity instanceof EntityPlayerMP)
            {
                EntityPlayerMP player = (EntityPlayerMP) entity;
                player.addChatMessage(new ChatComponentText(EnumColor.RED + GCCoreUtil.translate("gui.warning.noroom")));
                ItemStack itemstack = new ItemStack(this, 1, 0);
                EntityItem entityitem = player.dropPlayerItemWithRandomChoice(itemstack, false);
                entityitem.delayBeforeCanPickup = 0;
                entityitem.func_145797_a(player.getCommandSenderName());
            }

            return;
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.