katubug

string troubleshooting

Jan 19th, 2020
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. import crafttweaker.item.IItemStack;
  2.  
  3. <ore:twine>.add(<betterwithmods:material:3>);
  4. <ore:twine>.remove(<minecraft:string>);
  5.  
  6. //Change String recipes to use OreDict
  7. recipes.replaceAllOccurences(<minecraft:string>, <ore:twine>, <*>.only(function(item) {
  8. return !isNull(item) & !<minecraft:wool>.matches(item);
  9. }));
  10.  
  11. <ore:string>.add(<minecraft:beef>);
  12.  
  13. //Adds a recipe for nametags
  14. recipes.addShaped("nametag", <minecraft:name_tag> * 2, [[<minecraft:string>, <minecraft:string>, null],[<minecraft:string>, <ore:paper>, null], [null, null, <ore:dyeBlack>]]);
  15.  
  16. //Okay, so the replacement script itself works fine.
  17. //I am now testing it with the oredict added to the pyrotech items.
  18. //Weird. That changes it to use the string oredict instead! wat.
  19. //Now testing with BWM added, without the oredict added to the bwm string.
  20. //That worked fine. Now testing it while adding twine to the BWM hemp fibers.
  21. //That also worked. Now testing it by adding a non-string thing to oredict.
  22. //That borks it. One more test: what happens if I put the string oredict under the replaceall line?
  23. //Still bork.
  24. //Now, testing to see if it affect custom recipes.
  25. //It does.
  26. //Now, per request. I have removed minecraft:string from the twine oredict to see how it handles that.
  27. //Everything is still accepts any: string. And it's still ignoring the wool exemption.
Advertisement
Add Comment
Please, Sign In to add comment