Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.33 KB | None | 0 0
  1. package net.minecraft.src;
  2. import java.util.Random;
  3. public class BlockPamFlower extends BlockFlower
  4. {
  5.  
  6. protected BlockPamFlower(int i, int j)
  7. {
  8. super(i, j);
  9. blockIndexInTexture = j;
  10. setTickOnLoad(true);
  11. float f = 0.2F;
  12. setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 3F, 0.5F + f);
  13. }
  14.  
  15. public int getBlockTextureFromSideAndMetadata(int i, int j)
  16. {
  17. if(j == 0)
  18. {
  19. return mod_Pamflowers.blackplant;
  20. }
  21. if(j == 1)
  22. {
  23. return mod_Pamflowers.blueplant;
  24. }
  25. if(j == 2)
  26. {
  27. return mod_Pamflowers.brownplant;
  28. } else
  29. if(j == 3)
  30. {
  31. return mod_Pamflowers.cyanplant;
  32. } else
  33. if(j == 4)
  34. {
  35. return mod_Pamflowers.greenplant;
  36. } else
  37. if(j == 5)
  38. {
  39. return mod_Pamflowers.greyplant;
  40. } else
  41. if(j == 6)
  42. {
  43. return mod_Pamflowers.lightblueplant;
  44. } else
  45. if(j == 7)
  46. {
  47. return mod_Pamflowers.lightgreyplant;
  48. } else
  49. if(j == 8)
  50. {
  51. return mod_Pamflowers.limeplant;
  52. } else
  53. if(j == 9)
  54. {
  55. return mod_Pamflowers.magentaplant;
  56. } else
  57. if(j == 10)
  58. {
  59. return mod_Pamflowers.orangeplant;
  60. } else
  61. if(j == 11)
  62. {
  63. return mod_Pamflowers.pinkplant;
  64. } else
  65. if(j == 2)
  66. {
  67. return mod_Pamflowers.purpleplant;
  68. } else
  69. if(j == 2)
  70. {
  71. return mod_Pamflowers.whiteplant;
  72. } else
  73. {
  74. j = ~(j & 0xf);
  75. return 113 + ((j & 8) >> 3) + (j & 7) * 16;
  76. }
  77. }
  78.  
  79.  
  80.  
  81. protected int damageDropped(int j)
  82. {
  83. return j;
  84. }
  85.  
  86. public static int func_21034_c(int j)
  87. {
  88. return ~j & 0xf;
  89. }
  90.  
  91. public static int func_21035_d(int j)
  92. {
  93. return ~j & 0xf;
  94. }
  95.  
  96. public boolean canPlaceBlockAt(World world, int i, int j, int k)
  97. {
  98. return super.canPlaceBlockAt(world, i, j, k) && canThisPlantGrowOnThisBlockID(world.getBlockId(i, j - 1, k));
  99. }
  100.  
  101. protected boolean canThisPlantGrowOnThisBlockID(int i)
  102. {
  103. return i == Block.grass.blockID || i == Block.dirt.blockID || i == Block.tilledField.blockID;
  104. }
  105.  
  106. public void onNeighborBlockChange(World world, int i, int j, int k, int l)
  107. {
  108. super.onNeighborBlockChange(world, i, j, k, l);
  109. func_268_h(world, i, j, k);
  110. }
  111.  
  112. public void updateTick(World world, int i, int j, int k, Random random)
  113. {
  114. func_268_h(world, i, j, k);
  115. }
  116.  
  117.  
  118.  
  119. public boolean canBlockStay(World world, int i, int j, int k)
  120. {
  121. return (world.getFullBlockLightValue(i, j, k) >= 8 || world.canBlockSeeTheSky(i, j, k)) && canThisPlantGrowOnThisBlockID(world.getBlockId(i, j - 1, k));
  122. }
  123.  
  124. public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
  125. {
  126. return null;
  127. }
  128.  
  129. public boolean isOpaqueCube()
  130. {
  131. return false;
  132. }
  133.  
  134. public boolean renderAsNormalBlock()
  135. {
  136. return false;
  137. }
  138.  
  139. public int getRenderType()
  140. {
  141. return 1;
  142. }
  143. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement