Advertisement
Guest User

Untitled

a guest
Sep 10th, 2011
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. package net.minecraft.src;
  2. import java.util.Random;
  3.  
  4.  
  5. public class BlockStepBase extends Block
  6. {
  7. public BlockStepBase(int i, int j)
  8. {
  9. super(i,j,Material.ground);
  10. if(i==110)
  11. {
  12. setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
  13. }
  14. setLightOpacity(255);
  15. }
  16. public int getBlockTextureFromSideAndMetadata(int i, int j)
  17. {
  18. int a;
  19. switch(j)
  20. {
  21. case 0:
  22. a= mod_Block.blockBaseTexture;
  23. break;
  24. case 1:
  25. a= mod_Block.blockBlank1Texture;
  26. break;
  27. case 2:
  28. a= mod_Block.blockBlank2Texture;
  29. break;
  30. default:
  31. a= mod_Block.blockBaseTexture;
  32. break;
  33.  
  34. }
  35. return a;
  36. }
  37. public boolean isOpaqueCube()
  38. {
  39. return false;
  40. }
  41. public int getRenderBlockPass()
  42. {
  43. return 1;
  44. }
  45. public int idDropped(int i, Random random)
  46. {
  47. return 110;
  48. }
  49. public int quantityDropped(Random random)
  50. {
  51. if(blockID==110)
  52. {
  53. return 1;
  54. }
  55. return 2;
  56. }
  57.  
  58. public void onBlockAdded(World world, int i, int j, int k)
  59. {
  60. if(blockID != 110)
  61. {
  62. super.onBlockAdded(world, i, j, k);
  63. }
  64. int l = world.getBlockId(i, j - 1, k);
  65. int i1 = world.getBlockMetadata(i, j, k);
  66. int j1 = world.getBlockMetadata(i, j - 1, k);
  67. if(i1 != j1)
  68. {
  69. return;
  70. }
  71. if(l == 110)
  72. {
  73. world.setBlockWithNotify(i, j, k, 0);
  74. world.setBlockAndMetadataWithNotify(i, j - 1, k, 111, i1);
  75. }
  76. }
  77.  
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement