Made special drops dependent on the looting level you have

This commit is contained in:
Ellpeck 2016-05-16 21:10:35 +02:00
parent 0454fc521b
commit 7aa813f04e

View file

@ -30,22 +30,22 @@ public class LivingDropEvent{
if(event.getSource().getEntity() instanceof EntityPlayer){
//Drop Solidified XP
if(event.getEntityLiving() instanceof EntityCreature){
if(Util.RANDOM.nextInt(10) <= 0){
event.getEntityLiving().entityDropItem(new ItemStack(InitItems.itemSolidifiedExperience, Util.RANDOM.nextInt(2)+1), 0);
if(Util.RANDOM.nextInt(10) <= event.getLootingLevel()*2){
event.getEntityLiving().entityDropItem(new ItemStack(InitItems.itemSolidifiedExperience, Util.RANDOM.nextInt(2+event.getLootingLevel())+1), 0);
}
}
//Drop Cobwebs from Spiders
if(ConfigBoolValues.DO_SPIDER_DROPS.isEnabled() && event.getEntityLiving() instanceof EntitySpider){
if(Util.RANDOM.nextInt(20) <= 0){
event.getEntityLiving().entityDropItem(new ItemStack(Blocks.WEB, Util.RANDOM.nextInt(2)+1), 0);
if(Util.RANDOM.nextInt(20) <= event.getLootingLevel()*2){
event.getEntityLiving().entityDropItem(new ItemStack(Blocks.WEB, Util.RANDOM.nextInt(2+event.getLootingLevel())+1), 0);
}
}
//Drop Wings from Bats
if(ConfigBoolValues.DO_BAT_DROPS.isEnabled() && event.getEntityLiving() instanceof EntityBat){
if(Util.RANDOM.nextInt(15) <= 0){
event.getEntityLiving().entityDropItem(new ItemStack(InitItems.itemMisc, Util.RANDOM.nextInt(2)+1, TheMiscItems.BAT_WING.ordinal()), 0);
if(Util.RANDOM.nextInt(15) <= event.getLootingLevel()*2){
event.getEntityLiving().entityDropItem(new ItemStack(InitItems.itemMisc, Util.RANDOM.nextInt(2+event.getLootingLevel())+1, TheMiscItems.BAT_WING.ordinal()), 0);
}
}
}