-
-
Save anonymous/8a47cf7bae6e80f332aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.koopamillion.item; | |
import java.util.Set; | |
import com.google.common.collect.ImmutableSet; | |
import com.google.common.collect.Sets; | |
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; | |
import net.minecraft.world.World; | |
public class EPick extends ItemPickaxe{ | |
protected EPick(ToolMaterial p_i45347_1_) { | |
super(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)); | |
}else{ | |
System.out.print(Player.inventory.getCurrentItem()); | |
} | |
} | |
@Override | |
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