Skip to content

Instantly share code, notes, and snippets.

/ Secret

Created Mar 27, 2016
What would you like to do?
package com.koopamillion.item;
import java.util.Set;
import net.minecraft.block.Block;
import net.minecraft.block.BlockDirt;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
public class EPick extends ItemPickaxe{
protected EPick(ToolMaterial p_i45347_1_) {
this.setHarvestLevel("pickaxe", 2);
public void onUpdate(ItemStack Stack, World world, Entity entity, int par4, boolean par5)
EntityPlayer Player = Minecraft.getMinecraft().thePlayer;
Stack = Player.inventory.getCurrentItem();
if(Stack != null && Stack.getItem() == Mitems.ePick && Stack.getItemDamage() == 255){
int slot = Player.inventory.currentItem;
Player.inventory.setInventorySlotContents(slot, new ItemStack(Mitems.ePickDead));
public Set<String> getToolClasses(ItemStack stack) {
return ImmutableSet.of("pickaxe", "shovel");
private static Set effectiveAgainst = Sets.newHashSet(new Block[] {
Blocks.grass, Blocks.dirt, Blocks.sand, Blocks.gravel,
Blocks.snow_layer, Blocks.snow, Blocks.clay, Blocks.farmland,
Blocks.soul_sand, Blocks.mycelium});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment