SHARE
TWEET

ItemWoodenFence.java

a guest Feb 16th, 2019 111 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package main.Test;
  2.  
  3. import net.minecraft.block.Block;
  4. import net.minecraft.item.ItemBlockWithMetadata;
  5. import net.minecraft.item.ItemStack;
  6.  
  7. public class ItemWoodenFence extends ItemBlockWithMetadata {
  8.  
  9.  
  10.     public ItemWoodenFence(Block block) {
  11.  
  12.         super(block, block);
  13.         this.setMaxDamage(0);
  14.         this.setHasSubtypes(true);
  15.     }
  16.  
  17.     @Override
  18.     public String getUnlocalizedName(ItemStack par1ItemStack) {
  19.             return super.getUnlocalizedName() + "_" + BlockWoodenFence.fenceType[par1ItemStack.getItemDamage()];
  20.     }
  21.  
  22.     @Override
  23.     public int getMetadata(int meta) {
  24.         return meta;
  25.     }
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top