Atticool

crafttweaker function 1

Aug 5th, 2021
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. import crafttweaker.item.IIngredient;
  2. import crafttweaker.item.IItemStack;
  3.  
  4. function funcCrushing(input as IIngredient, output as IIngredient, energy as long, output2 as IIngredient, chance as float){
  5. var longchance = chance *100;
  6. var stackOutputList = output.items as IItemStack[];
  7. var stackInputList = input.items as IItemStack[];
  8. var stackOutput2List = output2.items as IItemStack[];
  9. var stackOutput = IItemStack;
  10. var stackInput = IItemStack;
  11. var stackOutput2 = IItemStack;
  12. for item in stackOutputList{
  13. stackOutput = item;
  14. break;
  15. }
  16. for item in stackInputList{
  17. stackInput = item;
  18. break;
  19. }
  20. for item in stackOutput2List{
  21. stackOutput2 = item;
  22. break;
  23. }
  24.  
  25. mods.thermalexpansion.Pulverizer.addRecipe(stackOutput, stackInput, energy, stackOutput2, longchance);
  26. }
  27.  
  28. funcCrushing(<minecraft:stone_slab:3>, <minecraft:stone_slab:1>, 1500, <minecraft:wool:4>, 0.2);
Advertisement
Add Comment
Please, Sign In to add comment