Quethed

Minecraft MCreator Oak Tree Code

Apr 30th, 2018
200
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. if (world.getBlockState(new BlockPos(i, j - 1, k)).getBlock() == Blocks.LOG) {
  4. if ((Math.random() * 100) <= 66) {
  5. if (world.getBlockState(new BlockPos(i, j + 1, k)).getBlock() == Blocks.AIR) {
  6. if (world.getBlockState(new BlockPos(i, j + 2, k)).getBlock() == Blocks.AIR) {
  7. if (world.getBlockState(new BlockPos(i, j + 3, k)).getBlock() == Blocks.AIR) {
  8. if (world.getBlockState(new BlockPos(i + 1, j + 1, k)).getBlock() == Blocks.AIR) {
  9. if (world.getBlockState(new BlockPos(i + 1, j + 2, k)).getBlock() == Blocks.AIR) {
  10. if (world.getBlockState(new BlockPos(i + 1, j + 3, k)).getBlock() == Blocks.AIR) {
  11. if (world.getBlockState(new BlockPos(i - 1, j + 1, k)).getBlock() == Blocks.AIR) {
  12. if (world.getBlockState(new BlockPos(i - 1, j + 2, k)).getBlock() == Blocks.AIR) {
  13. if (world.getBlockState(new BlockPos(i - 1, j + 3, k)).getBlock() == Blocks.AIR) {
  14. if (world.getBlockState(new BlockPos(i, j + 1, k + 1)).getBlock() == Blocks.AIR) {
  15. if (world.getBlockState(new BlockPos(i, j + 2, k + 1)).getBlock() == Blocks.AIR) {
  16. if (world.getBlockState(new BlockPos(i, j + 3, k + 1)).getBlock() == Blocks.AIR) {
  17. if (world.getBlockState(new BlockPos(i + 1, j + 1, k + 1)).getBlock() == Blocks.AIR) {
  18. if (world.getBlockState(new BlockPos(i + 1, j + 2, k + 1)).getBlock() == Blocks.AIR) {
  19. if (world.getBlockState(new BlockPos(i + 1, j + 3, k + 1)).getBlock() == Blocks.AIR) {
  20. if (world.getBlockState(new BlockPos(i - 1, j + 1, k + 1)).getBlock() == Blocks.AIR) {
  21. if (world.getBlockState(new BlockPos(i - 1, j + 2, k + 1)).getBlock() == Blocks.AIR) {
  22. if (world.getBlockState(new BlockPos(i - 1, j + 3, k + 1)).getBlock() == Blocks.AIR) {
  23. if (world.getBlockState(new BlockPos(i + 1, j + 1, k - 1)).getBlock() == Blocks.AIR) {
  24. if (world.getBlockState(new BlockPos(i + 1, j + 2, k - 1)).getBlock() == Blocks.AIR) {
  25. if (world.getBlockState(new BlockPos(i + 1, j + 3, k - 1)).getBlock() == Blocks.AIR) {
  26. if (world.getBlockState(new BlockPos(i - 1, j + 1, k - 1)).getBlock() == Blocks.AIR) {
  27. if (world.getBlockState(new BlockPos(i - 1, j + 2, k - 1)).getBlock() == Blocks.AIR) {
  28. if (world.getBlockState(new BlockPos(i - 1, j + 3, k - 1)).getBlock() == Blocks.AIR) {
  29. if (world.getBlockState(new BlockPos(i, j - 3, k)).getBlock() != Blocks.LOG) {
  30. world.setBlockState(new BlockPos(i, j, k), Blocks.LOG.getDefaultState(), 3);
  31. world.setBlockState(new BlockPos(i, j + 1, k), mcreator_oakTree.block.getDefaultState(), 3);
  32. }
  33. }
  34. }
  35. }
  36. }
  37. }
  38. }
  39. }
  40. }
  41. }
  42. }
  43. }
  44. }
  45. }
  46. }
  47. }
  48. }
  49. }
  50. }
  51. }
  52. }
  53. }
  54. }
  55. }
  56. }
  57. }
  58. else if (true) {
  59. if (world.getBlockState(new BlockPos(i, j + 1, k)).getBlock() == Blocks.AIR) {
  60. world.setBlockState(new BlockPos(i, j + 1, k), Blocks.LOG.getDefaultState(), 3);
  61. }
  62. if (world.getBlockState(new BlockPos(i, j + 2, k)).getBlock() == Blocks.AIR) {
  63. world.setBlockState(new BlockPos(i, j + 2, k), Blocks.LEAVES.getDefaultState(), 3);
  64. }
  65. if (world.getBlockState(new BlockPos(i, j + 3, k)).getBlock() == Blocks.AIR) {
  66. world.setBlockState(new BlockPos(i, j + 3, k), Blocks.LEAVES.getDefaultState(), 3);
  67. }
  68.  
  69. if (world.getBlockState(new BlockPos(i + 1, j, k)).getBlock() == Blocks.AIR) {
  70. world.setBlockState(new BlockPos(i + 1, j, k), Blocks.LEAVES.getDefaultState(), 3);
  71. }
  72. if (world.getBlockState(new BlockPos(i + 1, j + 1, k)).getBlock() == Blocks.AIR) {
  73. world.setBlockState(new BlockPos(i + 1, j + 1, k), Blocks.LEAVES.getDefaultState(), 3);
  74. }
  75. if (world.getBlockState(new BlockPos(i + 1, j + 2, k)).getBlock() == Blocks.AIR) {
  76. world.setBlockState(new BlockPos(i + 1, j + 2, k), Blocks.LEAVES.getDefaultState(), 3);
  77. }
  78.  
  79. if (world.getBlockState(new BlockPos(i - 1, j, k)).getBlock() == Blocks.AIR) {
  80. world.setBlockState(new BlockPos(i - 1, j, k), Blocks.LEAVES.getDefaultState(), 3);
  81. }
  82. if (world.getBlockState(new BlockPos(i - 1, j + 1, k)).getBlock() == Blocks.AIR) {
  83. world.setBlockState(new BlockPos(i - 1, j + 1, k), Blocks.LEAVES.getDefaultState(), 3);
  84. }
  85. if (world.getBlockState(new BlockPos(i - 1, j + 2, k)).getBlock() == Blocks.AIR) {
  86. world.setBlockState(new BlockPos(i - 1, j + 2, k), Blocks.LEAVES.getDefaultState(), 3);
  87. }
  88.  
  89. if (world.getBlockState(new BlockPos(i, j, k + 1)).getBlock() == Blocks.AIR) {
  90. world.setBlockState(new BlockPos(i, j, k + 1), Blocks.LEAVES.getDefaultState(), 3);
  91. }
  92. if (world.getBlockState(new BlockPos(i, j + 1, k + 1)).getBlock() == Blocks.AIR) {
  93. world.setBlockState(new BlockPos(i, j + 1, k + 1), Blocks.LEAVES.getDefaultState(), 3);
  94. }
  95. if (world.getBlockState(new BlockPos(i, j + 2, k + 1)).getBlock() == Blocks.AIR) {
  96. world.setBlockState(new BlockPos(i, j + 2, k + 1), Blocks.LEAVES.getDefaultState(), 3);
  97. }
  98.  
  99. if (world.getBlockState(new BlockPos(i, j, k - 1)).getBlock() == Blocks.AIR) {
  100. world.setBlockState(new BlockPos(i, j, k - 1), Blocks.LEAVES.getDefaultState(), 3);
  101. }
  102. if (world.getBlockState(new BlockPos(i, j + 1, k - 1)).getBlock() == Blocks.AIR) {
  103. world.setBlockState(new BlockPos(i, j + 1, k - 1), Blocks.LEAVES.getDefaultState(), 3);
  104. }
  105. if (world.getBlockState(new BlockPos(i, j + 2, k - 1)).getBlock() == Blocks.AIR) {
  106. world.setBlockState(new BlockPos(i, j + 2, k - 1), Blocks.LEAVES.getDefaultState(), 3);
  107. }
  108.  
  109. if (world.getBlockState(new BlockPos(i - 1, j, k - 1)).getBlock() == Blocks.AIR) {
  110. world.setBlockState(new BlockPos(i - 1, j, k - 1), Blocks.LEAVES.getDefaultState(), 3);
  111. }
  112. if (world.getBlockState(new BlockPos(i - 1, j + 1, k - 1)).getBlock() == Blocks.AIR) {
  113. world.setBlockState(new BlockPos(i - 1, j + 1, k - 1), Blocks.LEAVES.getDefaultState(), 3);
  114. }
  115.  
  116. if (world.getBlockState(new BlockPos(i + 1, j, k - 1)).getBlock() == Blocks.AIR) {
  117. world.setBlockState(new BlockPos(i + 1, j, k - 1), Blocks.LEAVES.getDefaultState(), 3);
  118. }
  119. if (world.getBlockState(new BlockPos(i + 1, j + 1, k - 1)).getBlock() == Blocks.AIR) {
  120. world.setBlockState(new BlockPos(i + 1, j + 1, k - 1), Blocks.LEAVES.getDefaultState(), 3);
  121. }
  122.  
  123. if (world.getBlockState(new BlockPos(i - 1, j, k + 1)).getBlock() == Blocks.AIR) {
  124. world.setBlockState(new BlockPos(i - 1, j, k + 1), Blocks.LEAVES.getDefaultState(), 3);
  125. }
  126. if (world.getBlockState(new BlockPos(i - 1, j + 1, k + 1)).getBlock() == Blocks.AIR) {
  127. world.setBlockState(new BlockPos(i - 1, j + 1, k + 1), Blocks.LEAVES.getDefaultState(), 3);
  128. }
  129.  
  130. if (world.getBlockState(new BlockPos(i + 1, j, k + 1)).getBlock() == Blocks.AIR) {
  131. world.setBlockState(new BlockPos(i + 1, j, k + 1), Blocks.LEAVES.getDefaultState(), 3);
  132. }
  133. if (world.getBlockState(new BlockPos(i + 1, j + 1, k + 1)).getBlock() == Blocks.AIR) {
  134. world.setBlockState(new BlockPos(i + 1, j + 1, k + 1), Blocks.LEAVES.getDefaultState(), 3);
  135. }
  136.  
  137. if (world.getBlockState(new BlockPos(i, j, k + 2)).getBlock() == Blocks.AIR) {
  138. world.setBlockState(new BlockPos(i, j, k + 2), Blocks.LEAVES.getDefaultState(), 3);
  139. }
  140. if (world.getBlockState(new BlockPos(i, j + 1, k + 2)).getBlock() == Blocks.AIR) {
  141. world.setBlockState(new BlockPos(i, j + 1, k + 2), Blocks.LEAVES.getDefaultState(), 3);
  142. }
  143.  
  144. if (world.getBlockState(new BlockPos(i, j, k - 2)).getBlock() == Blocks.AIR) {
  145. world.setBlockState(new BlockPos(i, j, k - 2), Blocks.LEAVES.getDefaultState(), 3);
  146. }
  147. if (world.getBlockState(new BlockPos(i, j + 1, k - 2)).getBlock() == Blocks.AIR) {
  148. world.setBlockState(new BlockPos(i, j + 1, k - 2), Blocks.LEAVES.getDefaultState(), 3);
  149. }
  150.  
  151. if (world.getBlockState(new BlockPos(i + 2, j, k)).getBlock() == Blocks.AIR) {
  152. world.setBlockState(new BlockPos(i + 2, j, k), Blocks.LEAVES.getDefaultState(), 3);
  153. }
  154. if (world.getBlockState(new BlockPos(i + 2, j + 1, k)).getBlock() == Blocks.AIR) {
  155. world.setBlockState(new BlockPos(i + 2, j + 1, k), Blocks.LEAVES.getDefaultState(), 3);
  156. }
  157.  
  158. if (world.getBlockState(new BlockPos(i - 2, j, k)).getBlock() == Blocks.AIR) {
  159. world.setBlockState(new BlockPos(i - 2, j, k), Blocks.LEAVES.getDefaultState(), 3);
  160. }
  161. if (world.getBlockState(new BlockPos(i - 2, j + 1, k)).getBlock() == Blocks.AIR) {
  162. world.setBlockState(new BlockPos(i - 2, j + 1, k), Blocks.LEAVES.getDefaultState(), 3);
  163. }
  164.  
  165. if (world.getBlockState(new BlockPos(i - 2, j, k + 1)).getBlock() == Blocks.AIR) {
  166. world.setBlockState(new BlockPos(i - 2, j, k + 1), Blocks.LEAVES.getDefaultState(), 3);
  167. }
  168. if (world.getBlockState(new BlockPos(i - 2, j + 1, k + 1)).getBlock() == Blocks.AIR) {
  169. world.setBlockState(new BlockPos(i - 2, j + 1, k + 1), Blocks.LEAVES.getDefaultState(), 3);
  170. }
  171.  
  172. if (world.getBlockState(new BlockPos(i - 2, j, k - 1)).getBlock() == Blocks.AIR) {
  173. world.setBlockState(new BlockPos(i - 2, j, k - 1), Blocks.LEAVES.getDefaultState(), 3);
  174. }
  175. if (world.getBlockState(new BlockPos(i - 2, j + 1, k - 1)).getBlock() == Blocks.AIR) {
  176. world.setBlockState(new BlockPos(i - 2, j + 1, k - 1), Blocks.LEAVES.getDefaultState(), 3);
  177. }
  178.  
  179. if (world.getBlockState(new BlockPos(i + 2, j, k + 1)).getBlock() == Blocks.AIR) {
  180. world.setBlockState(new BlockPos(i + 2, j, k + 1), Blocks.LEAVES.getDefaultState(), 3);
  181. }
  182. if (world.getBlockState(new BlockPos(i + 2, j + 1, k + 1)).getBlock() == Blocks.AIR) {
  183. world.setBlockState(new BlockPos(i + 2, j + 1, k + 1), Blocks.LEAVES.getDefaultState(), 3);
  184. }
  185.  
  186. if (world.getBlockState(new BlockPos(i + 2, j, k - 1)).getBlock() == Blocks.AIR) {
  187. world.setBlockState(new BlockPos(i + 2, j, k - 1), Blocks.LEAVES.getDefaultState(), 3);
  188. }
  189. if (world.getBlockState(new BlockPos(i + 2, j + 1, k - 1)).getBlock() == Blocks.AIR) {
  190. world.setBlockState(new BlockPos(i + 2, j + 1, k - 1), Blocks.LEAVES.getDefaultState(), 3);
  191. }
  192.  
  193. if (world.getBlockState(new BlockPos(i - 1, j, k + 2)).getBlock() == Blocks.AIR) {
  194. world.setBlockState(new BlockPos(i - 1, j, k + 2), Blocks.LEAVES.getDefaultState(), 3);
  195. }
  196. if (world.getBlockState(new BlockPos(i - 1, j + 1, k + 2)).getBlock() == Blocks.AIR) {
  197. world.setBlockState(new BlockPos(i - 1, j + 1, k + 2), Blocks.LEAVES.getDefaultState(), 3);
  198. }
  199.  
  200. if (world.getBlockState(new BlockPos(i - 1, j, k - 2)).getBlock() == Blocks.AIR) {
  201. world.setBlockState(new BlockPos(i - 1, j, k - 2), Blocks.LEAVES.getDefaultState(), 3);
  202. }
  203. if (world.getBlockState(new BlockPos(i - 1, j + 1, k - 2)).getBlock() == Blocks.AIR) {
  204. world.setBlockState(new BlockPos(i - 1, j + 1, k - 2), Blocks.LEAVES.getDefaultState(), 3);
  205. }
  206.  
  207. if (world.getBlockState(new BlockPos(i + 1, j, k + 2)).getBlock() == Blocks.AIR) {
  208. world.setBlockState(new BlockPos(i + 1, j, k + 2), Blocks.LEAVES.getDefaultState(), 3);
  209. }
  210. if (world.getBlockState(new BlockPos(i + 1, j + 1, k + 2)).getBlock() == Blocks.AIR) {
  211. world.setBlockState(new BlockPos(i + 1, j + 1, k + 2), Blocks.LEAVES.getDefaultState(), 3);
  212. }
  213.  
  214. if (world.getBlockState(new BlockPos(i + 1, j, k - 2)).getBlock() == Blocks.AIR) {
  215. world.setBlockState(new BlockPos(i + 1, j, k - 2), Blocks.LEAVES.getDefaultState(), 3);
  216. }
  217. if (world.getBlockState(new BlockPos(i + 1, j + 1, k - 2)).getBlock() == Blocks.AIR) {
  218. world.setBlockState(new BlockPos(i + 1, j + 1, k - 2), Blocks.LEAVES.getDefaultState(), 3);
  219. }
  220.  
  221. if (world.getBlockState(new BlockPos(i - 1, j, k + 1)).getBlock() == Blocks.AIR) {
  222. world.setBlockState(new BlockPos(i - 1, j, k + 1), Blocks.LEAVES.getDefaultState(), 3);
  223. }
  224. if (world.getBlockState(new BlockPos(i - 1, j + 1, k + 1)).getBlock() == Blocks.AIR) {
  225. world.setBlockState(new BlockPos(i - 1, j + 1, k + 1), Blocks.LEAVES.getDefaultState(), 3);
  226. }
  227.  
  228. if (world.getBlockState(new BlockPos(i - 1, j, k - 1)).getBlock() == Blocks.AIR) {
  229. world.setBlockState(new BlockPos(i - 1, j, k - 1), Blocks.LEAVES.getDefaultState(), 3);
  230. }
  231. if (world.getBlockState(new BlockPos(i - 1, j + 1, k - 1)).getBlock() == Blocks.AIR) {
  232. world.setBlockState(new BlockPos(i - 1, j + 1, k - 1), Blocks.LEAVES.getDefaultState(), 3);
  233. }
  234.  
  235. if (world.getBlockState(new BlockPos(i + 1, j, k + 1)).getBlock() == Blocks.AIR) {
  236. world.setBlockState(new BlockPos(i + 1, j, k + 1), Blocks.LEAVES.getDefaultState(), 3);
  237. }
  238. if (world.getBlockState(new BlockPos(i + 1, j + 1, k + 1)).getBlock() == Blocks.AIR) {
  239. world.setBlockState(new BlockPos(i + 1, j + 1, k + 1), Blocks.LEAVES.getDefaultState(), 3);
  240. }
  241.  
  242. if (world.getBlockState(new BlockPos(i + 1, j, k - 1)).getBlock() == Blocks.AIR) {
  243. world.setBlockState(new BlockPos(i + 1, j, k - 1), Blocks.LEAVES.getDefaultState(), 3);
  244. }
  245. if (world.getBlockState(new BlockPos(i + 1, j + 1, k - 1)).getBlock() == Blocks.AIR) {
  246. world.setBlockState(new BlockPos(i + 1, j + 1, k - 1), Blocks.LEAVES.getDefaultState(), 3);
  247. }
  248. if (world.getBlockState(new BlockPos(i - 1, j + 3, k)).getBlock() == Blocks.AIR) {
  249. world.setBlockState(new BlockPos(i - 1, j + 3, k), Blocks.LEAVES.getDefaultState(), 3);
  250. }
  251. if (world.getBlockState(new BlockPos(i + 1, j + 3, k)).getBlock() == Blocks.AIR) {
  252. world.setBlockState(new BlockPos(i + 1, j + 3, k), Blocks.LEAVES.getDefaultState(), 3);
  253. }
  254. if (world.getBlockState(new BlockPos(i, j + 3, k + 1)).getBlock() == Blocks.AIR) {
  255. world.setBlockState(new BlockPos(i, j + 3, k + 1), Blocks.LEAVES.getDefaultState(), 3);
  256. }
  257. if (world.getBlockState(new BlockPos(i, j + 3, k - 1)).getBlock() == Blocks.AIR) {
  258. world.setBlockState(new BlockPos(i, j + 3, k - 1), Blocks.LEAVES.getDefaultState(), 3);
  259. }
  260.  
  261. if ((Math.random() * 100) <= 90) {
  262. if (world.getBlockState(new BlockPos(i - 1, j + 2, k - 1)).getBlock() == Blocks.AIR) {
  263. world.setBlockState(new BlockPos(i - 1, j + 2, k - 1), Blocks.LEAVES.getDefaultState(), 3);
  264. }
  265. }
  266. if ((Math.random() * 100) <= 90) {
  267. if (world.getBlockState(new BlockPos(i + 1, j + 2, k - 1)).getBlock() == Blocks.AIR) {
  268. world.setBlockState(new BlockPos(i + 1, j + 2, k - 1), Blocks.LEAVES.getDefaultState(), 3);
  269. }
  270. }
  271. if ((Math.random() * 100) <= 90) {
  272. if (world.getBlockState(new BlockPos(i - 1, j + 2, k + 1)).getBlock() == Blocks.AIR) {
  273. world.setBlockState(new BlockPos(i - 1, j + 2, k + 1), Blocks.LEAVES.getDefaultState(), 3);
  274. }
  275. }
  276. if ((Math.random() * 100) <= 90) {
  277. if (world.getBlockState(new BlockPos(i + 1, j + 2, k + 1)).getBlock() == Blocks.AIR) {
  278. world.setBlockState(new BlockPos(i + 1, j + 2, k + 1), Blocks.LEAVES.getDefaultState(), 3);
  279. }
  280. }
  281.  
  282. if ((Math.random() * 100) <= 75) {
  283. if (world.getBlockState(new BlockPos(i - 2, j + 1, k - 2)).getBlock() == Blocks.AIR) {
  284. world.setBlockState(new BlockPos(i - 2, j + 1, k - 2), Blocks.LEAVES.getDefaultState(), 3);
  285. }
  286. }
  287. if ((Math.random() * 100) <= 75) {
  288. if (world.getBlockState(new BlockPos(i + 2, j + 1, k - 2)).getBlock() == Blocks.AIR) {
  289. world.setBlockState(new BlockPos(i + 2, j + 1, k - 2), Blocks.LEAVES.getDefaultState(), 3);
  290. }
  291. }
  292. if ((Math.random() * 100) <= 75) {
  293. if (world.getBlockState(new BlockPos(i - 2, j + 1, k + 2)).getBlock() == Blocks.AIR) {
  294. world.setBlockState(new BlockPos(i - 2, j + 1, k + 2), Blocks.LEAVES.getDefaultState(), 3);
  295. }
  296. }
  297. if ((Math.random() * 100) <= 75) {
  298. if (world.getBlockState(new BlockPos(i + 2, j, k + 2)).getBlock() == Blocks.AIR) {
  299. world.setBlockState(new BlockPos(i + 2, j, k + 2), Blocks.LEAVES.getDefaultState(), 3);
  300. }
  301. }
  302.  
  303. if ((Math.random() * 100) <= 75) {
  304. if (world.getBlockState(new BlockPos(i - 2, j, k - 2)).getBlock() == Blocks.AIR) {
  305. world.setBlockState(new BlockPos(i - 2, j, k - 2), Blocks.LEAVES.getDefaultState(), 3);
  306. }
  307. }
  308. if ((Math.random() * 100) <= 75) {
  309. if (world.getBlockState(new BlockPos(i + 2, j, k - 2)).getBlock() == Blocks.AIR) {
  310. world.setBlockState(new BlockPos(i + 2, j, k - 2), Blocks.LEAVES.getDefaultState(), 3);
  311. }
  312. }
  313. if ((Math.random() * 100) <= 75) {
  314. if (world.getBlockState(new BlockPos(i - 2, j, k + 2)).getBlock() == Blocks.AIR) {
  315. world.setBlockState(new BlockPos(i - 2, j, k + 2), Blocks.LEAVES.getDefaultState(), 3);
  316. }
  317. }
  318. if ((Math.random() * 100) <= 75) {
  319. if (world.getBlockState(new BlockPos(i + 2, j, k + 2)).getBlock() == Blocks.AIR) {
  320. world.setBlockState(new BlockPos(i + 2, j, k + 2), Blocks.LEAVES.getDefaultState(), 3);
  321. }
  322. }
  323. world.setBlockState(new BlockPos(i, j, k), Blocks.LOG.getDefaultState(), 3);
  324. }
  325. }
  326. else if (true) {
  327. world.setBlockState(new BlockPos(i, j, k), Blocks.LOG.getDefaultState(), 3);
  328. if (world.getBlockState(new BlockPos(i, j + 1, k)).getBlock() == Blocks.AIR) {
  329. world.setBlockState(new BlockPos(i, j + 1, k), mcreator_oakTree.block.getDefaultState(), 3);
  330. }
  331. }
RAW Paste Data