Advertisement
Guest User

Untitled

a guest
Dec 14th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var fs = require('fs');
  2.  
  3. var potionPrefix = "type=item\nitems=potion\nmodel=item/";
  4.  
  5. var lingerPrefix = "type=item\nitems=lingering_potion\nmodel=item/";
  6.  
  7. var splashPrefix = "type=item\nitems=splash_potion\nmodel=item/";
  8.  
  9. var suffix = "\nnbt.Potion=minecraft:";
  10.  
  11. var regular = ["empty", "mundane", "thick", "awkward", "night_vision", "invisibility", "leaping", "fire_resistance", "slowness", "water_breathing", "harming", "poison", "regeneration", "strength", "weakness", "luck", "turtle_master", "slow_falling"];
  12. var strong = ["leaping", "slowness", "harming", "poison", "regeneration", "strength", "turtle_master"];
  13. var long = ["night_vision", "invisibility", "leaping", "fire_resistance", "slowness", "water_breathing", "poison", "regeneration", "strength", "weakness", "turtle_master", "slow_falling"];
  14.  
  15. for (var i = 0; i < regular.length; i++) {
  16.     var effect = regular[i];
  17.  
  18.     fs.mkdirSync("potion/" + effect, { recursive: true });
  19.    
  20.     fs.writeFileSync("potion/" + effect + "/" + effect + "_potion.properties", potionPrefix + effect + "_potion" + suffix + effect);
  21.     fs.writeFileSync("potion/" + effect + "/" + effect + "_linger.properties", potionPrefix + effect + "_linger" + suffix + effect);
  22.     fs.writeFileSync("potion/" + effect + "/" + effect + "_splash.properties", potionPrefix + effect + "_splash" + suffix + effect);
  23.  
  24.     if (strong.includes(regular[i])) {
  25.         fs.writeFileSync("potion/" + effect + "/" + effect + "_potion_strong.properties", potionPrefix + effect + "_potion" + suffix + "strong_" + effect);
  26.         fs.writeFileSync("potion/" + effect + "/" + effect + "_linger_strong.properties", potionPrefix + effect + "_linger" + suffix + "strong_" + effect);
  27.         fs.writeFileSync("potion/" + effect + "/" + effect + "_splash_strong.properties", potionPrefix + effect + "_splash" + suffix + "strong_" + effect);
  28.     }
  29.  
  30.     if (long.includes(regular[i])) {
  31.         fs.writeFileSync("potion/" + effect + "/" + effect + "_potion_long.properties", potionPrefix + effect + "_potion" + suffix + "strong_" + effect);
  32.         fs.writeFileSync("potion/" + effect + "/" + effect + "_linger_long.properties", potionPrefix + effect + "_linger" + suffix + "strong_" + effect);
  33.         fs.writeFileSync("potion/" + effect + "/" + effect + "_splash_long.properties", potionPrefix + effect + "_splash" + suffix + "strong_" + effect);
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement