Advertisement
Rekt1

java errors

Jun 11th, 2020
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.97 KB | None | 0 0
  1. package net.mcreator.vanillaforging.procedures;
  2.  
  3. import net.minecraftforge.items.IItemHandlerModifiable;
  4. import net.minecraftforge.items.CapabilityItemHandler;
  5.  
  6. import net.minecraft.world.World;
  7. import net.minecraft.util.math.BlockPos;
  8. import net.minecraft.tileentity.TileEntity;
  9. import net.minecraft.item.Items;
  10. import net.minecraft.item.ItemStack;
  11. import net.minecraft.block.Blocks;
  12.  
  13. import net.mcreator.vanillaforging.item.WootzsteelchunkItem;
  14. import net.mcreator.vanillaforging.item.WootzSteelBaseBucketItem;
  15. import net.mcreator.vanillaforging.item.SteelHardeningDustItem;
  16. import net.mcreator.vanillaforging.item.StardustItem;
  17. import net.mcreator.vanillaforging.item.ScrapItem;
  18. import net.mcreator.vanillaforging.item.CoaldustItem;
  19. import net.mcreator.vanillaforging.VanillaforgingModElements;
  20.  
  21. import java.util.concurrent.atomic.AtomicReference;
  22. import java.util.concurrent.atomic.AtomicInteger;
  23.  
  24. @VanillaforgingModElements.ModElement.Tag
  25. public class MetallurgySmithingProcedureProcedure extends VanillaforgingModElements.ModElement {
  26. public MetallurgySmithingProcedureProcedure(VanillaforgingModElements instance) {
  27. super(instance, 234);
  28. }
  29.  
  30. public static void executeProcedure(java.util.HashMap<String, Object> dependencies) {
  31. if (dependencies.get("x") == null) {
  32. System.err.println("Failed to load dependency x for procedure MetallurgySmithingProcedure!");
  33. return;
  34. }
  35. if (dependencies.get("y") == null) {
  36. System.err.println("Failed to load dependency y for procedure MetallurgySmithingProcedure!");
  37. return;
  38. }
  39. if (dependencies.get("z") == null) {
  40. System.err.println("Failed to load dependency z for procedure MetallurgySmithingProcedure!");
  41. return;
  42. }
  43. if (dependencies.get("world") == null) {
  44. System.err.println("Failed to load dependency world for procedure MetallurgySmithingProcedure!");
  45. return;
  46. }
  47. int x = (int) dependencies.get("x");
  48. int y = (int) dependencies.get("y");
  49. int z = (int) dependencies.get("z");
  50. World world = (World) dependencies.get("world");
  51. if (((((new Object() {
  52. public int getAmount(BlockPos pos, int sltid) {
  53. AtomicInteger _retval = new AtomicInteger(0);
  54. TileEntity _ent = world.getTileEntity(pos);
  55. if (_ent != null) {
  56. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  57. _retval.set(capability.getStackInSlot(sltid).getCount());
  58. });
  59. }
  60. return _retval.get();
  61. }
  62. }.getAmount(new BlockPos((int) x, (int) y, (int) z), (int) (13))) < 64) && (((new Object() {
  63. public int getAmount(BlockPos pos, int sltid) {
  64. AtomicInteger _retval = new AtomicInteger(0);
  65. TileEntity _ent = world.getTileEntity(pos);
  66. if (_ent != null) {
  67. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  68. _retval.set(capability.getStackInSlot(sltid).getCount());
  69. });
  70. }
  71. return _retval.get();
  72. }
  73. }.getAmount(new BlockPos((int) x, (int) y, (int) z), (int) (14))) < 64) && ((new Object() {
  74. public int getAmount(BlockPos pos, int sltid) {
  75. AtomicInteger _retval = new AtomicInteger(0);
  76. TileEntity _ent = world.getTileEntity(pos);
  77. if (_ent != null) {
  78. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  79. _retval.set(capability.getStackInSlot(sltid).getCount());
  80. });
  81. }
  82. return _retval.get();
  83. }
  84. }.getAmount(new BlockPos((int) x, (int) y, (int) z), (int) (15))) < 64))) && ((((new Object() {
  85. public ItemStack getItemStack(BlockPos pos, int sltid) {
  86. AtomicReference<ItemStack> _retval = new AtomicReference<>(ItemStack.EMPTY);
  87. TileEntity _ent = world.getTileEntity(pos);
  88. if (_ent != null) {
  89. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  90. _retval.set(capability.getStackInSlot(sltid).copy());
  91. });
  92. }
  93. return _retval.get();
  94. }
  95. }.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (0))).getItem() == new ItemStack(WootzSteelBaseBucketItem.block, (int) (1))
  96. .getItem()) && (((new Object() {
  97. public ItemStack getItemStack(BlockPos pos, int sltid) {
  98. AtomicReference<ItemStack> _retval = new AtomicReference<>(ItemStack.EMPTY);
  99. TileEntity _ent = world.getTileEntity(pos);
  100. if (_ent != null) {
  101. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  102. _retval.set(capability.getStackInSlot(sltid).copy());
  103. });
  104. }
  105. return _retval.get();
  106. }
  107. }.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (1))).getItem() == new ItemStack(Blocks.BLUE_ICE, (int) (1)).getItem())
  108. && (((new Object() {
  109. public ItemStack getItemStack(BlockPos pos, int sltid) {
  110. AtomicReference<ItemStack> _retval = new AtomicReference<>(ItemStack.EMPTY);
  111. TileEntity _ent = world.getTileEntity(pos);
  112. if (_ent != null) {
  113. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  114. _retval.set(capability.getStackInSlot(sltid).copy());
  115. });
  116. }
  117. return _retval.get();
  118. }
  119. }.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (2))).getItem() == new ItemStack(Items.LAPIS_LAZULI, (int) (1))
  120. .getItem()) && (((new Object() {
  121. public ItemStack getItemStack(BlockPos pos, int sltid) {
  122. AtomicReference<ItemStack> _retval = new AtomicReference<>(ItemStack.EMPTY);
  123. TileEntity _ent = world.getTileEntity(pos);
  124. if (_ent != null) {
  125. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  126. _retval.set(capability.getStackInSlot(sltid).copy());
  127. });
  128. }
  129. return _retval.get();
  130. }
  131. }.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (3)))
  132. .getItem() == new ItemStack(Blocks.BLUE_ICE, (int) (1)).getItem()) && (((new Object() {
  133. public ItemStack getItemStack(BlockPos pos, int sltid) {
  134. AtomicReference<ItemStack> _retval = new AtomicReference<>(ItemStack.EMPTY);
  135. TileEntity _ent = world.getTileEntity(pos);
  136. if (_ent != null) {
  137. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  138. _retval.set(capability.getStackInSlot(sltid).copy());
  139. });
  140. }
  141. return _retval.get();
  142. }
  143. }.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (4)))
  144. .getItem() == new ItemStack(Items.LAPIS_LAZULI, (int) (1)).getItem()) && (((new Object() {
  145. public ItemStack getItemStack(BlockPos pos, int sltid) {
  146. AtomicReference<ItemStack> _retval = new AtomicReference<>(ItemStack.EMPTY);
  147. TileEntity _ent = world.getTileEntity(pos);
  148. if (_ent != null) {
  149. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null)
  150. .ifPresent(capability -> {
  151. _retval.set(capability.getStackInSlot(sltid).copy());
  152. });
  153. }
  154. return _retval.get();
  155. }
  156. }.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (5)))
  157. .getItem() == new ItemStack(CoaldustItem.block, (int) (1)).getItem()) && (((new Object() {
  158. public ItemStack getItemStack(BlockPos pos, int sltid) {
  159. AtomicReference<ItemStack> _retval = new AtomicReference<>(ItemStack.EMPTY);
  160. TileEntity _ent = world.getTileEntity(pos);
  161. if (_ent != null) {
  162. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null)
  163. .ifPresent(capability -> {
  164. _retval.set(capability.getStackInSlot(sltid).copy());
  165. });
  166. }
  167. return _retval.get();
  168. }
  169. }.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (6)))
  170. .getItem() == new ItemStack(CoaldustItem.block, (int) (1)).getItem())
  171. && (((new Object() {
  172. public ItemStack getItemStack(BlockPos pos, int sltid) {
  173. AtomicReference<ItemStack> _retval = new AtomicReference<>(ItemStack.EMPTY);
  174. TileEntity _ent = world.getTileEntity(pos);
  175. if (_ent != null) {
  176. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null)
  177. .ifPresent(capability -> {
  178. _retval.set(capability.getStackInSlot(sltid).copy());
  179. });
  180. }
  181. return _retval.get();
  182. }
  183. }.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (7)))
  184. .getItem() == new ItemStack(CoaldustItem.block, (int) (1)).getItem())
  185. && (((new Object() {
  186. public ItemStack getItemStack(BlockPos pos, int sltid) {
  187. AtomicReference<ItemStack> _retval = new AtomicReference<>(
  188. ItemStack.EMPTY);
  189. TileEntity _ent = world.getTileEntity(pos);
  190. if (_ent != null) {
  191. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY,
  192. null).ifPresent(capability -> {
  193. _retval.set(capability.getStackInSlot(sltid).copy());
  194. });
  195. }
  196. return _retval.get();
  197. }
  198. }.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (8)))
  199. .getItem() == new ItemStack(CoaldustItem.block, (int) (1)).getItem())
  200. && (((new Object() {
  201. public ItemStack getItemStack(BlockPos pos, int sltid) {
  202. AtomicReference<ItemStack> _retval = new AtomicReference<>(
  203. ItemStack.EMPTY);
  204. TileEntity _ent = world.getTileEntity(pos);
  205. if (_ent != null) {
  206. _ent.getCapability(
  207. CapabilityItemHandler.ITEM_HANDLER_CAPABILITY,
  208. null).ifPresent(capability -> {
  209. _retval.set(capability.getStackInSlot(sltid)
  210. .copy());
  211. });
  212. }
  213. return _retval.get();
  214. }
  215. }.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (9)))
  216. .getItem() == new ItemStack(SteelHardeningDustItem.block,
  217. (int) (1)).getItem())
  218. && (((new Object() {
  219. public ItemStack getItemStack(BlockPos pos, int sltid) {
  220. AtomicReference<ItemStack> _retval = new AtomicReference<>(
  221. ItemStack.EMPTY);
  222. TileEntity _ent = world.getTileEntity(pos);
  223. if (_ent != null) {
  224. _ent.getCapability(
  225. CapabilityItemHandler.ITEM_HANDLER_CAPABILITY,
  226. null).ifPresent(capability -> {
  227. _retval.set(capability
  228. .getStackInSlot(sltid)
  229. .copy());
  230. });
  231. }
  232. return _retval.get();
  233. }
  234. }.getItemStack(new BlockPos((int) x, (int) y, (int) z),
  235. (int) (10)))
  236. .getItem() == new ItemStack(
  237. StardustItem.block, (int) (1))
  238. .getItem())
  239. && (((new Object() {
  240. public ItemStack getItemStack(BlockPos pos,
  241. int sltid) {
  242. AtomicReference<ItemStack> _retval = new AtomicReference<>(
  243. ItemStack.EMPTY);
  244. TileEntity _ent = world.getTileEntity(pos);
  245. if (_ent != null) {
  246. _ent.getCapability(
  247. CapabilityItemHandler.ITEM_HANDLER_CAPABILITY,
  248. null).ifPresent(capability -> {
  249. _retval.set(capability
  250. .getStackInSlot(sltid)
  251. .copy());
  252. });
  253. }
  254. return _retval.get();
  255. }
  256. }.getItemStack(
  257. new BlockPos((int) x, (int) y, (int) z),
  258. (int) (11)))
  259. .getItem() == new ItemStack(
  260. SteelHardeningDustItem.block,
  261. (int) (1)).getItem())
  262. && ((new Object() {
  263. public ItemStack getItemStack(
  264. BlockPos pos, int sltid) {
  265. AtomicReference<ItemStack> _retval = new AtomicReference<>(
  266. ItemStack.EMPTY);
  267. TileEntity _ent = world
  268. .getTileEntity(pos);
  269. if (_ent != null) {
  270. _ent.getCapability(
  271. CapabilityItemHandler.ITEM_HANDLER_CAPABILITY,
  272. null)
  273. .ifPresent(capability -> {
  274. _retval.set(capability
  275. .getStackInSlot(
  276. sltid)
  277. .copy());
  278. });
  279. }
  280. return _retval.get();
  281. }
  282. }.getItemStack(
  283. new BlockPos((int) x, (int) y,
  284. (int) z),
  285. (int) (12)))
  286. .getItem() == new ItemStack(
  287. StardustItem.block,
  288. (int) (1))
  289. .getItem())))))))))))))
  290. && (((((new Object() {
  291. public int getAmount(BlockPos pos, int sltid) {
  292. AtomicInteger _retval = new AtomicInteger(0);
  293. TileEntity _ent = world.getTileEntity(pos);
  294. if (_ent != null) {
  295. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  296. _retval.set(capability.getStackInSlot(sltid).getCount());
  297. });
  298. }
  299. return _retval.get();
  300. }
  301. }.getAmount(new BlockPos((int) x, (int) y, (int) z), (int) (13))) <= 62) && ((new Object() {
  302. public ItemStack getItemStack(BlockPos pos, int sltid) {
  303. AtomicReference<ItemStack> _retval = new AtomicReference<>(ItemStack.EMPTY);
  304. TileEntity _ent = world.getTileEntity(pos);
  305. if (_ent != null) {
  306. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  307. _retval.set(capability.getStackInSlot(sltid).copy());
  308. });
  309. }
  310. return _retval.get();
  311. }
  312. }.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (13))).getItem() == new ItemStack(ScrapItem.block, (int) (1))
  313. .getItem())) && ((new Object() {
  314. public ItemStack getItemStack(BlockPos pos, int sltid) {
  315. AtomicReference<ItemStack> _retval = new AtomicReference<>(ItemStack.EMPTY);
  316. TileEntity _ent = world.getTileEntity(pos);
  317. if (_ent != null) {
  318. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  319. _retval.set(capability.getStackInSlot(sltid).copy());
  320. });
  321. }
  322. return _retval.get();
  323. }
  324. }.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (13))).getItem() == new ItemStack(Blocks.AIR, (int) (1))
  325. .getItem()))
  326. && (((((new Object() {
  327. public int getAmount(BlockPos pos, int sltid) {
  328. AtomicInteger _retval = new AtomicInteger(0);
  329. TileEntity _ent = world.getTileEntity(pos);
  330. if (_ent != null) {
  331. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  332. _retval.set(capability.getStackInSlot(sltid).getCount());
  333. });
  334. }
  335. return _retval.get();
  336. }
  337. }.getAmount(new BlockPos((int) x, (int) y, (int) z), (int) (14))) <= 61) && ((new Object() {
  338. public ItemStack getItemStack(BlockPos pos, int sltid) {
  339. AtomicReference<ItemStack> _retval = new AtomicReference<>(ItemStack.EMPTY);
  340. TileEntity _ent = world.getTileEntity(pos);
  341. if (_ent != null) {
  342. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  343. _retval.set(capability.getStackInSlot(sltid).copy());
  344. });
  345. }
  346. return _retval.get();
  347. }
  348. }.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (14)))
  349. .getItem() == new ItemStack(WootzsteelchunkItem.block, (int) (1)).getItem())) || ((new Object() {
  350. public ItemStack getItemStack(BlockPos pos, int sltid) {
  351. AtomicReference<ItemStack> _retval = new AtomicReference<>(ItemStack.EMPTY);
  352. TileEntity _ent = world.getTileEntity(pos);
  353. if (_ent != null) {
  354. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  355. _retval.set(capability.getStackInSlot(sltid).copy());
  356. });
  357. }
  358. return _retval.get();
  359. }
  360. }.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (14))).getItem() == new ItemStack(Blocks.AIR, (int) (1))
  361. .getItem()))
  362. && ((((new Object() {
  363. public int getAmount(BlockPos pos, int sltid) {
  364. AtomicInteger _retval = new AtomicInteger(0);
  365. TileEntity _ent = world.getTileEntity(pos);
  366. if (_ent != null) {
  367. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  368. _retval.set(capability.getStackInSlot(sltid).getCount());
  369. });
  370. }
  371. return _retval.get();
  372. }
  373. }.getAmount(new BlockPos((int) x, (int) y, (int) z), (int) (15))) <= 63) && ((new Object() {
  374. public ItemStack getItemStack(BlockPos pos, int sltid) {
  375. AtomicReference<ItemStack> _retval = new AtomicReference<>(ItemStack.EMPTY);
  376. TileEntity _ent = world.getTileEntity(pos);
  377. if (_ent != null) {
  378. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  379. _retval.set(capability.getStackInSlot(sltid).copy());
  380. });
  381. }
  382. return _retval.get();
  383. }
  384. }.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (15)))
  385. .getItem() == new ItemStack(Items.BUCKET, (int) (1)).getItem())) || ((new Object() {
  386. public ItemStack getItemStack(BlockPos pos, int sltid) {
  387. AtomicReference<ItemStack> _retval = new AtomicReference<>(ItemStack.EMPTY);
  388. TileEntity _ent = world.getTileEntity(pos);
  389. if (_ent != null) {
  390. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  391. _retval.set(capability.getStackInSlot(sltid).copy());
  392. });
  393. }
  394. return _retval.get();
  395. }
  396. }.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (15)))
  397. .getItem() == new ItemStack(Blocks.AIR, (int) (1)).getItem()))))))) {
  398. {
  399. TileEntity _ent = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
  400. if (_ent != null) {
  401. final int _sltid = (int) (0);
  402. final int _amount = (int) 1;
  403. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  404. if (capability instanceof IItemHandlerModifiable) {
  405. ItemStack _stk = capability.getStackInSlot(_sltid).copy();
  406. _stk.shrink(_amount);
  407. ((IItemHandlerModifiable) capability).setStackInSlot(_sltid, _stk);
  408. }
  409. });
  410. }
  411. }
  412. {
  413. TileEntity _ent = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
  414. if (_ent != null) {
  415. final int _sltid = (int) (1);
  416. final int _amount = (int) 1;
  417. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  418. if (capability instanceof IItemHandlerModifiable) {
  419. ItemStack _stk = capability.getStackInSlot(_sltid).copy();
  420. _stk.shrink(_amount);
  421. ((IItemHandlerModifiable) capability).setStackInSlot(_sltid, _stk);
  422. }
  423. });
  424. }
  425. }
  426. {
  427. TileEntity _ent = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
  428. if (_ent != null) {
  429. final int _sltid = (int) (2);
  430. final int _amount = (int) 1;
  431. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  432. if (capability instanceof IItemHandlerModifiable) {
  433. ItemStack _stk = capability.getStackInSlot(_sltid).copy();
  434. _stk.shrink(_amount);
  435. ((IItemHandlerModifiable) capability).setStackInSlot(_sltid, _stk);
  436. }
  437. });
  438. }
  439. }
  440. {
  441. TileEntity _ent = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
  442. if (_ent != null) {
  443. final int _sltid = (int) (3);
  444. final int _amount = (int) 1;
  445. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  446. if (capability instanceof IItemHandlerModifiable) {
  447. ItemStack _stk = capability.getStackInSlot(_sltid).copy();
  448. _stk.shrink(_amount);
  449. ((IItemHandlerModifiable) capability).setStackInSlot(_sltid, _stk);
  450. }
  451. });
  452. }
  453. }
  454. {
  455. TileEntity _ent = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
  456. if (_ent != null) {
  457. final int _sltid = (int) (4);
  458. final int _amount = (int) 1;
  459. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  460. if (capability instanceof IItemHandlerModifiable) {
  461. ItemStack _stk = capability.getStackInSlot(_sltid).copy();
  462. _stk.shrink(_amount);
  463. ((IItemHandlerModifiable) capability).setStackInSlot(_sltid, _stk);
  464. }
  465. });
  466. }
  467. }
  468. {
  469. TileEntity _ent = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
  470. if (_ent != null) {
  471. final int _sltid = (int) (5);
  472. final int _amount = (int) 1;
  473. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  474. if (capability instanceof IItemHandlerModifiable) {
  475. ItemStack _stk = capability.getStackInSlot(_sltid).copy();
  476. _stk.shrink(_amount);
  477. ((IItemHandlerModifiable) capability).setStackInSlot(_sltid, _stk);
  478. }
  479. });
  480. }
  481. }
  482. {
  483. TileEntity _ent = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
  484. if (_ent != null) {
  485. final int _sltid = (int) (6);
  486. final int _amount = (int) 1;
  487. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  488. if (capability instanceof IItemHandlerModifiable) {
  489. ItemStack _stk = capability.getStackInSlot(_sltid).copy();
  490. _stk.shrink(_amount);
  491. ((IItemHandlerModifiable) capability).setStackInSlot(_sltid, _stk);
  492. }
  493. });
  494. }
  495. }
  496. {
  497. TileEntity _ent = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
  498. if (_ent != null) {
  499. final int _sltid = (int) (7);
  500. final int _amount = (int) 1;
  501. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  502. if (capability instanceof IItemHandlerModifiable) {
  503. ItemStack _stk = capability.getStackInSlot(_sltid).copy();
  504. _stk.shrink(_amount);
  505. ((IItemHandlerModifiable) capability).setStackInSlot(_sltid, _stk);
  506. }
  507. });
  508. }
  509. }
  510. {
  511. TileEntity _ent = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
  512. if (_ent != null) {
  513. final int _sltid = (int) (8);
  514. final int _amount = (int) 1;
  515. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  516. if (capability instanceof IItemHandlerModifiable) {
  517. ItemStack _stk = capability.getStackInSlot(_sltid).copy();
  518. _stk.shrink(_amount);
  519. ((IItemHandlerModifiable) capability).setStackInSlot(_sltid, _stk);
  520. }
  521. });
  522. }
  523. }
  524. {
  525. TileEntity _ent = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
  526. if (_ent != null) {
  527. final int _sltid = (int) (9);
  528. final int _amount = (int) 1;
  529. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  530. if (capability instanceof IItemHandlerModifiable) {
  531. ItemStack _stk = capability.getStackInSlot(_sltid).copy();
  532. _stk.shrink(_amount);
  533. ((IItemHandlerModifiable) capability).setStackInSlot(_sltid, _stk);
  534. }
  535. });
  536. }
  537. }
  538. {
  539. TileEntity _ent = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
  540. if (_ent != null) {
  541. final int _sltid = (int) (10);
  542. final int _amount = (int) 1;
  543. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  544. if (capability instanceof IItemHandlerModifiable) {
  545. ItemStack _stk = capability.getStackInSlot(_sltid).copy();
  546. _stk.shrink(_amount);
  547. ((IItemHandlerModifiable) capability).setStackInSlot(_sltid, _stk);
  548. }
  549. });
  550. }
  551. }
  552. {
  553. TileEntity _ent = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
  554. if (_ent != null) {
  555. final int _sltid = (int) (11);
  556. final int _amount = (int) 1;
  557. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  558. if (capability instanceof IItemHandlerModifiable) {
  559. ItemStack _stk = capability.getStackInSlot(_sltid).copy();
  560. _stk.shrink(_amount);
  561. ((IItemHandlerModifiable) capability).setStackInSlot(_sltid, _stk);
  562. }
  563. });
  564. }
  565. }
  566. {
  567. TileEntity _ent = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
  568. if (_ent != null) {
  569. final int _sltid = (int) (12);
  570. final int _amount = (int) 1;
  571. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  572. if (capability instanceof IItemHandlerModifiable) {
  573. ItemStack _stk = capability.getStackInSlot(_sltid).copy();
  574. _stk.shrink(_amount);
  575. ((IItemHandlerModifiable) capability).setStackInSlot(_sltid, _stk);
  576. }
  577. });
  578. }
  579. }
  580. {
  581. TileEntity _ent = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
  582. if (_ent != null) {
  583. final int _sltid = (int) (13);
  584. final ItemStack _setstack = new ItemStack(ScrapItem.block, (int) (1));
  585. _setstack.setCount((int) ((new Object() {
  586. public int getAmount(BlockPos pos, int sltid) {
  587. AtomicInteger _retval = new AtomicInteger(0);
  588. TileEntity _ent = world.getTileEntity(pos);
  589. if (_ent != null) {
  590. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  591. _retval.set(capability.getStackInSlot(sltid).getCount());
  592. });
  593. }
  594. return _retval.get();
  595. }
  596. }.getAmount(new BlockPos((int) x, (int) y, (int) z), (int) (13))) + 2));
  597. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  598. if (capability instanceof IItemHandlerModifiable) {
  599. ((IItemHandlerModifiable) capability).setStackInSlot(_sltid, _setstack);
  600. }
  601. });
  602. }
  603. }
  604. {
  605. TileEntity _ent = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
  606. if (_ent != null) {
  607. final int _sltid = (int) (14);
  608. final ItemStack _setstack = new ItemStack(WootzsteelchunkItem.block, (int) (1));
  609. _setstack.setCount((int) ((new Object() {
  610. public int getAmount(BlockPos pos, int sltid) {
  611. AtomicInteger _retval = new AtomicInteger(0);
  612. TileEntity _ent = world.getTileEntity(pos);
  613. if (_ent != null) {
  614. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  615. _retval.set(capability.getStackInSlot(sltid).getCount());
  616. });
  617. }
  618. return _retval.get();
  619. }
  620. }.getAmount(new BlockPos((int) x, (int) y, (int) z), (int) (14))) + 3));
  621. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  622. if (capability instanceof IItemHandlerModifiable) {
  623. ((IItemHandlerModifiable) capability).setStackInSlot(_sltid, _setstack);
  624. }
  625. });
  626. }
  627. }
  628. {
  629. TileEntity _ent = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
  630. if (_ent != null) {
  631. final int _sltid = (int) (15);
  632. final ItemStack _setstack = new ItemStack(Items.BUCKET, (int) (1));
  633. _setstack.setCount((int) ((new Object() {
  634. public int getAmount(BlockPos pos, int sltid) {
  635. AtomicInteger _retval = new AtomicInteger(0);
  636. TileEntity _ent = world.getTileEntity(pos);
  637. if (_ent != null) {
  638. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  639. _retval.set(capability.getStackInSlot(sltid).getCount());
  640. });
  641. }
  642. return _retval.get();
  643. }
  644. }.getAmount(new BlockPos((int) x, (int) y, (int) z), (int) (15))) + 1));
  645. _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
  646. if (capability instanceof IItemHandlerModifiable) {
  647. ((IItemHandlerModifiable) capability).setStackInSlot(_sltid, _setstack);
  648. }
  649. });
  650. }
  651. }
  652. }
  653. }
  654. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement