public class EventStock {
private static Random random;
//------------------------------------------------------------------------------------------------------------
@SubscribeEvent
public void dropCobblestone(LivingDropsEvent event) {
if (event.source.getDamageType().equals("player")) {
random = new Random();
if (event.entityLiving instanceof EntityZombie) {
random = new Random();
if (random.nextInt(100) < 60) {
random = new Random();
event.entityLiving.entityDropItem(new ItemStack(Blocks.cobblestone, 1 + random.nextInt(5)), 0.0F);
}
}
}
}
//------------------------------------------------------------------------------------------------------------
@SubscribeEvent
public void dropMossyCobblestone(LivingDropsEvent event) {
if (event.source.getDamageType().equals("player")) {
if (event.entityLiving instanceof EntityZombie) {
random = new Random();
if (random.nextInt(100) < 25) {
random = new Random();
event.entityLiving.entityDropItem(new ItemStack(Blocks.mossy_cobblestone, 1 + random.nextInt(2)), 0.0F);
}
}
}
}
//------------------------------------------------------------------------------------------------------------
@SubscribeEvent
public void dropIronOre(LivingDropsEvent event) {
if (event.source.getDamageType().equals("player")) {
if (event.entityLiving instanceof EntityZombie) {
random = new Random();
if (random.nextInt(100) < 3) {
random = new Random();
event.entityLiving.entityDropItem(new ItemStack(Blocks.iron_ore, 1 + random.nextInt(1)), 0.0F);
}
}
}
}
//------------------------------------------------------------------------------------------------------------
@SubscribeEvent
public void dropCoalOre(LivingDropsEvent event) {
if (event.source.getDamageType().equals("player")) {
if (event.entityLiving instanceof EntityZombie) {
random = new Random();
if (random.nextInt(100) < 7) {
random = new Random();
event.entityLiving.entityDropItem(new ItemStack(Blocks.coal_ore, 1 + random.nextInt(2)), 0.0F);
}
}
}
}
//------------------------------------------------------------------------------------------------------------
@SubscribeEvent
public void dropLapisOre(LivingDropsEvent event) {
if (event.source.getDamageType().equals("player")) {
if (event.entityLiving instanceof EntityZombie) {
random = new Random();
if (random.nextInt(100) < 2) {
random = new Random();
event.entityLiving.entityDropItem(new ItemStack(Blocks.lapis_ore, 3 + random.nextInt(5)), 0.0F);
}
}
}
}
//------------------------------------------------------------------------------------------------------------
@SubscribeEvent
public void dropGoldOre(LivingDropsEvent event) {
if (event.source.getDamageType().equals("player")) {
if (event.entityLiving instanceof EntityZombie) {
random = new Random();
if (random.nextInt(1000) < 8) {
random = new Random();
event.entityLiving.entityDropItem(new ItemStack(Blocks.gold_ore, 1 + random.nextInt(1)), 0.0F);
}
}
}
}
//------------------------------------------------------------------------------------------------------------
}