Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 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. } else
  21. if(j == 1)
  22. {
  23. return mod_Pamflowers.blueplant;
  24. } else
  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 == 12)
  66. {
  67. return mod_Pamflowers.purpleplant;
  68. } else
  69. if(j == 13)
  70. {
  71. return mod_Pamflowers.whiteplant;
  72. } else
  73. {
  74. return blockIndexInTexture;
  75. }
  76. }
  77.  
  78.  
  79.  
  80. protected int damageDropped(int j)
  81. {
  82. return j;
  83. }
  84.  
  85. public static int func_21034_c(int j)
  86. {
  87. return ~j & 0xf;
  88. }
  89.  
  90. public static int func_21035_d(int j)
  91. {
  92. return ~j & 0xf;
  93. }
  94.  
  95. public boolean canPlaceBlockAt(World world, int i, int j, int k)
  96. {
  97. return super.canPlaceBlockAt(world, i, j, k) && canThisPlantGrowOnThisBlockID(world.getBlockId(i, j - 1, k));
  98. }
  99.  
  100. protected boolean canThisPlantGrowOnThisBlockID(int i)
  101. {
  102. return i == Block.grass.blockID || i == Block.dirt.blockID || i == Block.tilledField.blockID;
  103. }
  104.  
  105. public void onNeighborBlockChange(World world, int i, int j, int k, int l)
  106. {
  107. super.onNeighborBlockChange(world, i, j, k, l);
  108. func_268_h(world, i, j, k);
  109. }
  110.  
  111. public void updateTick(World world, int i, int j, int k, Random random)
  112. {
  113. func_268_h(world, i, j, k);
  114. }
  115.  
  116.  
  117.  
  118. public boolean canBlockStay(World world, int i, int j, int k)
  119. {
  120. return (world.getFullBlockLightValue(i, j, k) >= 8 || world.canBlockSeeTheSky(i, j, k)) && canThisPlantGrowOnThisBlockID(world.getBlockId(i, j - 1, k));
  121. }
  122.  
  123. public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
  124. {
  125. return null;
  126. }
  127.  
  128. public boolean isOpaqueCube()
  129. {
  130. return false;
  131. }
  132.  
  133. public boolean renderAsNormalBlock()
  134. {
  135. return false;
  136. }
  137.  
  138. public int getRenderType()
  139. {
  140. return 1;
  141. }
  142. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement