Advertisement
Guest User

LavaGlass

a guest
Apr 15th, 2015
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.06 KB | None | 0 0
  1. package yesodmod.general.block;
  2.  
  3. import java.util.Random;
  4.  
  5. import net.minecraft.block.BlockGlass;
  6. import net.minecraft.block.material.Material;
  7. import net.minecraft.creativetab.CreativeTabs;
  8. import yesodmod.general.client.ClientProxy;
  9.  
  10. public class LavaGlass extends BlockGlass {
  11.        
  12.     public LavaGlass() {
  13.         super(Material.glass, false);
  14.         setCreativeTab(CreativeTabs.tabBlock);
  15.         setBlockName("LavaGlass");
  16.         setLightLevel(1F);
  17.     }
  18.  
  19.     @Override
  20.     public int quantityDropped(Random p_149745_1_)
  21.     {
  22.         return 1;
  23.     }
  24.    
  25.     @Override
  26.     public boolean renderAsNormalBlock()
  27.     {
  28.         return false;
  29.     }
  30.    
  31.     @Override
  32.     public boolean isOpaqueCube()
  33.     {
  34.         return false;
  35.     }
  36.  
  37.     @Override
  38.     public int getRenderType()
  39.     {
  40.         return ClientProxy.lavaGlassRenderType;
  41.     }
  42.    
  43.     @Override
  44.     public boolean canRenderInPass(int pass)
  45.     {
  46.         //Set the static var in the client proxy
  47.         ClientProxy.renderPass = pass;
  48.         //the block can render in both passes, so return true always
  49.         return true;
  50.     }
  51.    
  52.     @Override
  53.     public int getRenderBlockPass()
  54.     {
  55.         return 1;
  56.     }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement