Guest User

Untitled

a guest
May 24th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.84 KB | None | 0 0
  1. package net.minecraft.src;
  2.  
  3. import java.util.Random;
  4.  
  5. public class BlockCobbleGlass extends BlockBreakable
  6. {
  7.     public BlockCobbleGlass(int x, int y, Material material, boolean flag)
  8.     {
  9.         super(x, y, material, flag);
  10.     }
  11.    
  12.     public int quantityDropped(Random random)
  13.     {
  14.         return 1;  //return 0; if you want nothing to return when you break it
  15.     }
  16.  
  17.     public int getRenderBlockPass()
  18.     {
  19.         return 0;
  20.     }
  21.    
  22.     public int getBlockTextureFromSide(int i)
  23.     {
  24.         if(i == 0)
  25.             return mod_GlassPass.InvisCobbleBottom;
  26.         if(i == 1)
  27.             return mod_GlassPass.InvisCobbleTop;
  28.         if(i == 2)
  29.             return mod_GlassPass.InvisCobbleSide;
  30.         if(i == 3)
  31.             return mod_GlassPass.InvisCobbleFront;
  32.         if(i == 4)
  33.             return mod_GlassPass.InvisCobbleSide;
  34.         if(i == 5)
  35.             return mod_GlassPass.InvisCobbleSide;
  36.        
  37.         return 0;
  38.     }
  39.  
  40.    
  41.     public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)
  42.     {
  43.         int l = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 0.5D) & 3;
  44.         if(l == 0)
  45.         {
  46.             world.setBlockMetadataWithNotify(i, j, k, 2);
  47.         }
  48.         if(l == 1)
  49.         {
  50.             world.setBlockMetadataWithNotify(i, j, k, 5);
  51.         }
  52.         if(l == 2)
  53.         {
  54.             world.setBlockMetadataWithNotify(i, j, k, 3);
  55.         }
  56.         if(l == 3)
  57.         {
  58.             world.setBlockMetadataWithNotify(i, j, k, 4);
  59.         }
  60.  
  61.    
  62.     public int getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l)
  63.     {
  64.         if(l == 1)
  65.         {
  66.             return blockIndexInTexture + 17;
  67.         }
  68.         if(l == 0)
  69.         {
  70.             return blockIndexInTexture + 17;
  71.         }
  72.         int i1 = iblockaccess.getBlockMetadata(i, j, k);
  73.         if(l != i1)
  74.         {
  75.             return blockIndexInTexture;
  76.         }
  77. }
Add Comment
Please, Sign In to add comment