summaryrefslogtreecommitdiff
path: root/ihl/utils/EntityDropEventHandler.java
blob: c8edf47e3154717a79b72c5a582ba434fe3116f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package ihl.utils;

import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.entity.passive.EntitySheep;

public class EntityDropEventHandler 
{
	@SubscribeEvent
	public void onEntityDropEvent(net.minecraftforge.event.entity.living.LivingDropsEvent event)
	{
		if(event.entityLiving instanceof EntitySheep && !event.entityLiving.isChild())
		{
			event.entityLiving.entityDropItem(IHLUtils.getThisModItemStackWithSize("muttonLard", event.entityLiving.worldObj.rand.nextInt(1)+1), 1f);
		}
	}
}