From 7517c25efe06baad8c1a4e1505d131d5f22c492f Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Wed, 15 Jul 2015 00:37:16 -0400 Subject: [PATCH] Remove copied code from ItemCarvablePumpkin --- .../chisel/item/ItemCarvablePumpkin.java | 47 +------------------ 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/src/main/java/com/cricketcraft/chisel/item/ItemCarvablePumpkin.java b/src/main/java/com/cricketcraft/chisel/item/ItemCarvablePumpkin.java index 06562465..f8df77e5 100644 --- a/src/main/java/com/cricketcraft/chisel/item/ItemCarvablePumpkin.java +++ b/src/main/java/com/cricketcraft/chisel/item/ItemCarvablePumpkin.java @@ -1,62 +1,17 @@ package com.cricketcraft.chisel.item; -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import com.cricketcraft.chisel.api.ICarvable; -import com.cricketcraft.chisel.api.carving.IVariationInfo; -import com.cricketcraft.chisel.config.Configurations; -import com.cricketcraft.chisel.utils.General; - -public class ItemCarvablePumpkin extends ItemBlock { +public class ItemCarvablePumpkin extends ItemCarvable { public ItemCarvablePumpkin(Block block) { super(block); - setMaxDamage(0); - setHasSubtypes(true); } @Override public boolean isValidArmor(ItemStack itemStack, int armorType, Entity entity){ return true; } - - @Override - public int getMetadata(int i) { - return i; - } - - @Override - public IIcon getIconFromDamage(int damage) { - return Block.getBlockFromItem(this).getIcon(2, damage); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List lines, boolean advancedTooltips) { - if (!Configurations.blockDescriptions) - return; - - Item item = General.getItem(stack); - if (item == null) - return; - - Block block = Block.getBlockFromItem(this); - if (!(block instanceof ICarvable)) - return; - - ICarvable carvable = (ICarvable) block; - IVariationInfo var = carvable.getManager(stack.getItemDamage()); - if (var == null) - return; - - lines.add(var.getDescription()); - } }