Advertisement
Guest User

ZenScripting for newbies.

a guest
Oct 18th, 2019
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. //Comments will look like this. Create a new script in the script folder. Recommend using the Notepad++, as it has a possible integration with the ZenScript(Google it)
  2.  
  3. //Start the script by these lines(And remember, that almost all the lines must end with ;)
  4. import crafttweaker.item.IItemStack as IItemStack;
  5. import mods.jei.JEI.removeAndHide as rh;
  6.  
  7. //Second thing is already the best- Just by writing things like this-
  8. rh(<buildcraftcore:gear_wood>);
  9. //Just an example, any item will be- It will remove the recipe from the item, and will hide it from JEI.
  10.  
  11. recipes.remove(<randomthings:goldencompass>);
  12. //This removes the recipe, but doesn't remove the item
  13.  
  14. recipes.addShaped("RT Golden Compass",
  15. <randomthings:goldencompass>,
  16. [[<minecraft:gold_ingot>, null, <minecraft:gold_ingot>],
  17. [null, <minecraft:compass>, null],
  18. [<minecraft:gold_ingot>, null, <minecraft:gold_ingot>]]);
  19. //This is the most important thing- recipes.addShaped("TheNameForItemGoesHereButYouCanUseAnyName", <ItemNameHere>,
  20. [[null, null, null],
  21. [null, null, null],
  22. [null, null, null]]);
  23. //Null is "No item here", and this is basically the crafting grid. You can perfectly make it like this-
  24. [[null, null, null], [null, null, null], [null, null, null]]);
  25. //But this is not really understandable, so yeah.
  26.  
  27. //And last, i want to give you the "How to delete a lot of recipes without making the same line too many times"
  28. val stuffToRemove = [
  29. //All your item go here, like
  30. <thermalfoundation:material:22>,
  31. <thermalfoundation:material:23>,
  32. <thermalfoundation:material:24>,
  33. <thermalfoundation:material:25>
  34. //The last line doesn't have the comma
  35. ] as IItemStack[];
  36. for items in stuffToRemove {
  37. recipes.remove(items);
  38. //Or you know, rh(items); if you need to delete all of them.
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement