mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
parent
1a0fd8887d
commit
84df42aec9
3 changed files with 5 additions and 3 deletions
|
@ -60,7 +60,7 @@ public class CommonEvents{
|
||||||
//Drop Cobwebs from Spiders
|
//Drop Cobwebs from Spiders
|
||||||
if(ConfigBoolValues.DO_SPIDER_DROPS.isEnabled() && event.getEntityLiving() instanceof EntitySpider){
|
if(ConfigBoolValues.DO_SPIDER_DROPS.isEnabled() && event.getEntityLiving() instanceof EntitySpider){
|
||||||
if(event.getEntityLiving().world.rand.nextInt(20) <= event.getLootingLevel()*2){
|
if(event.getEntityLiving().world.rand.nextInt(20) <= event.getLootingLevel()*2){
|
||||||
event.getEntityLiving().entityDropItem(new ItemStack(Blocks.WEB, event.getEntityLiving().world.rand.nextInt(2+event.getLootingLevel())+1), 0);
|
event.getDrops().add(new EntityItem(event.getEntityLiving().world, event.getEntityLiving().posX, event.getEntityLiving().posY, event.getEntityLiving().posZ, new ItemStack(Blocks.WEB, event.getEntityLiving().world.rand.nextInt(2+event.getLootingLevel())+1)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||||
import net.minecraft.entity.EntityCreature;
|
import net.minecraft.entity.EntityCreature;
|
||||||
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.entity.item.EntityXPOrb;
|
import net.minecraft.entity.item.EntityXPOrb;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
|
@ -44,7 +45,7 @@ public class ItemSolidifiedExperience extends ItemBase{
|
||||||
//Drop Solidified XP
|
//Drop Solidified XP
|
||||||
if(event.getEntityLiving() instanceof EntityCreature){
|
if(event.getEntityLiving() instanceof EntityCreature){
|
||||||
if(event.getEntityLiving().world.rand.nextInt(10) <= event.getLootingLevel()*2){
|
if(event.getEntityLiving().world.rand.nextInt(10) <= event.getLootingLevel()*2){
|
||||||
event.getEntityLiving().entityDropItem(new ItemStack(InitItems.itemSolidifiedExperience, event.getEntityLiving().world.rand.nextInt(2+event.getLootingLevel())+1), 0);
|
event.getDrops().add(new EntityItem(event.getEntityLiving().world, event.getEntityLiving().posX, event.getEntityLiving().posY, event.getEntityLiving().posZ, new ItemStack(InitItems.itemSolidifiedExperience, event.getEntityLiving().world.rand.nextInt(2+event.getLootingLevel())+1)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.entity.passive.EntityBat;
|
import net.minecraft.entity.passive.EntityBat;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
|
@ -94,7 +95,7 @@ public class ItemWingsOfTheBats extends ItemBase{
|
||||||
//Drop Wings from Bats
|
//Drop Wings from Bats
|
||||||
if(ConfigBoolValues.DO_BAT_DROPS.isEnabled() && event.getEntityLiving() instanceof EntityBat){
|
if(ConfigBoolValues.DO_BAT_DROPS.isEnabled() && event.getEntityLiving() instanceof EntityBat){
|
||||||
if(event.getEntityLiving().world.rand.nextInt(15) <= event.getLootingLevel()*2){
|
if(event.getEntityLiving().world.rand.nextInt(15) <= event.getLootingLevel()*2){
|
||||||
event.getEntityLiving().entityDropItem(new ItemStack(InitItems.itemMisc, event.getEntityLiving().world.rand.nextInt(2+event.getLootingLevel())+1, TheMiscItems.BAT_WING.ordinal()), 0);
|
event.getDrops().add(new EntityItem(event.getEntityLiving().world, event.getEntityLiving().posX, event.getEntityLiving().posY, event.getEntityLiving().posZ, new ItemStack(InitItems.itemMisc, event.getEntityLiving().world.rand.nextInt(2+event.getLootingLevel())+1, TheMiscItems.BAT_WING.ordinal())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue