InventoryBaubles baubles = PlayerHandler.getPlayerBaubles(player);
for(int i = 0; i < baubles.getSizeInventory(); i++)
chance += getChance(baubles.getStackInSlot(i));
if(Math.random() < chance) {
EntityPixie pixie = new EntityPixie(player.worldObj);
pixie.setPosition(player.posX, player.posY + 2, player.posZ);
float dmg = 4;
if(stack != null && stack.getItem() == ModItems.elementiumSword)
dmg += 2;
pixie.setProps((EntityLivingBase) event.source.getEntity(), player, 0, dmg);
player.worldObj.spawnEntityInWorld(pixie);
}
}
}