Skip to content

Instantly share code, notes, and snippets.

Created July 29, 2015 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/dd55a611845a1298bbcd to your computer and use it in GitHub Desktop.
Save anonymous/dd55a611845a1298bbcd to your computer and use it in GitHub Desktop.
package com.drunksmanknife.harshnature;
import com.drunksmanknife.harshnature.init.HarshNatureItems;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
public class HNEventHandler {
@SubscribeEvent
public void onBlockDropItems(BlockEvent.HarvestDropsEvent event) {
if (event.state.getBlock().equals(Blocks.leaves)) {
ItemStack stack = new ItemStack(HarshNatureItems.Twigs, 2);
event.drops.add(stack);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment