william341

NP Sandstone Clientside

Jun 17th, 2016
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. In block.java:
  2. public static final Block field_10008_a;
  3. ...
  4. field_10008_a = (new BlockSandstone(92, 176, false)).setHardness(1.0F).setStepSound(soundStoneFootstep);
  5. In craftingmanager.java:
  6. addRecipe(new ItemStack(Block.field_10008_a, 1), new Object[] {
  7. "###", "###", "###", Character.valueOf('#'), Block.sand
  8. });
  9.  
  10. NEW: BlockSandstone.java:
  11. package net.minecraft.src;
  12. // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
  13. // Jad home page: http://www.kpdus.com/jad.html
  14. // Decompiler options: packimports(3) braces deadcode
  15.  
  16.  
  17. public class BlockSandstone extends Block
  18. {
  19.  
  20. protected BlockSandstone(int i, int j, boolean flag)
  21. {
  22. super(i, Material.rock);
  23. blockIndexInTexture = j;
  24. setTickOnLoad(true);
  25. field_10008_a = flag;
  26. }
  27.  
  28. public int getBlockTextureFromSideAndMetadata(int i, int j)
  29. {
  30. if(i == 1)
  31. {
  32. return blockIndexInTexture;
  33. }
  34. if(i == 0)
  35. {
  36. return blockIndexInTexture;
  37. }
  38. int k = blockIndexInTexture + 1 + 16;
  39. if(field_10008_a)
  40. {
  41. k++;
  42. }
  43. if(j == 0 && i == 2)
  44. {
  45. return 192;
  46. }
  47. if(j == 1 && i == 5)
  48. {
  49. return 192;
  50. }
  51. if(j == 2 && i == 3)
  52. {
  53. return 192;
  54. }
  55. if(j == 3 && i == 4)
  56. {
  57. return 192;
  58. } else
  59. {
  60. return 192;
  61. }
  62. }
  63.  
  64. public int getBlockTextureFromSide(int i)
  65. {
  66. if(i == 1)
  67. {
  68. return blockIndexInTexture;
  69. }
  70. if(i == 0)
  71. {
  72. return blockIndexInTexture;
  73. }
  74. if(i == 3)
  75. {
  76. return 192;
  77. } else
  78. {
  79. return 192;
  80. }
  81. }
  82.  
  83. public void onBlockAdded(World world, int i, int j, int k)
  84. {
  85. super.onBlockAdded(world, i, j, k);
  86. }
  87.  
  88. public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)
  89. {
  90. int l = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 0.5D) & 3;
  91. world.setBlockMetadataWithNotify(i, j, k, l);
  92. }
  93.  
  94. private boolean field_10008_a;
  95. }
Advertisement
Add Comment
Please, Sign In to add comment