Skip to content

Instantly share code, notes, and snippets.

Created July 29, 2015 10:06
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/2fb367a5f8f97cfbbf50 to your computer and use it in GitHub Desktop.
Save anonymous/2fb367a5f8f97cfbbf50 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.block == 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