Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.src;
- import java.util.Random;
- public class BlockCobbleGlass extends BlockBreakable
- {
- public BlockCobbleGlass(int x, int y, Material material, boolean flag)
- {
- super(x, y, material, flag);
- }
- public int quantityDropped(Random random)
- {
- return 1; //return 0; if you want nothing to return when you break it
- }
- public int getRenderBlockPass()
- {
- return 0;
- }
- public int getBlockTextureFromSide(int i)
- {
- if(i == 0)
- return mod_GlassPass.InvisCobbleBottom;
- if(i == 1)
- return mod_GlassPass.InvisCobbleTop;
- if(i == 2)
- return mod_GlassPass.InvisCobbleSide;
- if(i == 3)
- return mod_GlassPass.InvisCobbleFront;
- if(i == 4)
- return mod_GlassPass.InvisCobbleSide;
- if(i == 5)
- return mod_GlassPass.InvisCobbleSide;
- return 0;
- }
- public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)
- {
- int l = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 0.5D) & 3;
- if(l == 0)
- {
- world.setBlockMetadataWithNotify(i, j, k, 2);
- }
- if(l == 1)
- {
- world.setBlockMetadataWithNotify(i, j, k, 5);
- }
- if(l == 2)
- {
- world.setBlockMetadataWithNotify(i, j, k, 3);
- }
- if(l == 3)
- {
- world.setBlockMetadataWithNotify(i, j, k, 4);
- }
- public int getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- if(l == 1)
- {
- return blockIndexInTexture + 17;
- }
- if(l == 0)
- {
- return blockIndexInTexture + 17;
- }
- int i1 = iblockaccess.getBlockMetadata(i, j, k);
- if(l != i1)
- {
- return blockIndexInTexture;
- }
- }
Add Comment
Please, Sign In to add comment