Advertisement
Guest User

Fence Tutorial Example 2

a guest
Sep 8th, 2019
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.60 KB | None | 0 0
  1. public static class BlockCustom extends BlockFence { //I replaced Block with BlockFence
  2.  
  3.     public BlockCustom() {
  4.         super(Material.WOOD, MapColor.RED); //I added MapColor.COLOR and replaced COLOR with RED
  5.         setRegistryName("tutorial_fence");
  6.         setUnlocalizedName("tutorial_fence");
  7.         setSoundType(SoundType.WOOD);
  8.         setHarvestLevel("axe", -1);
  9.         setHardness(2F);
  10.         setResistance(10F);
  11.         setLightLevel(0F);
  12.         setLightOpacity(0);
  13.         setCreativeTab(CreativeTabs.DECORATIONS);
  14.     }
  15.  
  16.     @SideOnly(Side.CLIENT)
  17.     @Override
  18.     public BlockRenderLayer getBlockLayer() {
  19.         return BlockRenderLayer.SOLID;
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement