diff options
| author | Foghrye4 <foghrye4@gmail.com> | 2016-04-11 19:44:54 +0300 |
|---|---|---|
| committer | Foghrye4 <foghrye4@gmail.com> | 2016-04-11 19:44:54 +0300 |
| commit | 05c78126859231a68e199dc34613689bd0978e2f (patch) | |
| tree | 050bea104a18c72905095d29f31bec2935a27a24 /ihl/utils/EntityDropEventHandler.java | |
Initial commit
Diffstat (limited to 'ihl/utils/EntityDropEventHandler.java')
| -rw-r--r-- | ihl/utils/EntityDropEventHandler.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ihl/utils/EntityDropEventHandler.java b/ihl/utils/EntityDropEventHandler.java new file mode 100644 index 0000000..f4021ef --- /dev/null +++ b/ihl/utils/EntityDropEventHandler.java @@ -0,0 +1,16 @@ +package ihl.utils;
+
+import net.minecraft.entity.passive.EntitySheep;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+
+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);
+ }
+ }
+}
|
