Skip to content

Instantly share code, notes, and snippets.

@CAD97
Created June 10, 2014 21:59
Show Gist options
  • Save CAD97/0f67b8f95804a0bd2d90 to your computer and use it in GitHub Desktop.
Save CAD97/0f67b8f95804a0bd2d90 to your computer and use it in GitHub Desktop.
package com.cad97.spawnercraft;
import net.minecraft.block.BlockMobSpawner;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityList;
import net.minecraft.item.ItemStack;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
public class EssenceDrop
{
@SubscribeEvent
public void on(HarvestDropsEvent event)
{
if (event.block instanceof BlockMobSpawner)
{
event.drops.add(new ItemStack(SpawnerCraft.mobCage, 1));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment