pjc21

LootTweaker_3.zs

Apr 7th, 2021
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. import loottweaker.LootTweaker;
  2. import loottweaker.vanilla.loot.LootTable;
  3. import loottweaker.vanilla.loot.LootPool;
  4. import loottweaker.vanilla.loot.Conditions;
  5. import loottweaker.vanilla.loot.Functions;
  6.  
  7. //==== Get LootTables used in Lost Cities ====
  8. val lostCityChests = LootTweaker.getTable("lostcities:chests/lostcitychest");
  9. val lostCityRailDungeonChests = LootTweaker.getTable("lostcities:chests/raildungeonchest");
  10. val netherBridgeChests = LootTweaker.getTable("minecraft:chests/nether_bridge");
  11. val abandonedMineshaftChests = LootTweaker.getTable("minecraft:chests/abandoned_mineshaft");
  12. val villageBlacksmithChests = LootTweaker.getTable("minecraft:chests/village_blacksmith");
  13. val desertPyramidChests = LootTweaker.getTable("minecraft:chests/desert_pyramid");
  14. val jungleTempleChests = LootTweaker.getTable("minecraft:chests/jungle_temple");
  15. val simpleDungeonChests = LootTweaker.getTable("minecraft:chests/simple_dungeon");
  16.  
  17. //==== Clear Tables ====
  18. lostCityChests.clear();
  19. lostCityRailDungeonChests.clear();
  20. netherBridgeChests.clear();
  21. abandonedMineshaftChests.clear();
  22. villageBlacksmithChests.clear();
  23. desertPyramidChests.clear();
  24. jungleTempleChests.clear();
  25. simpleDungeonChests.clear();
  26.  
  27. //==== Add New Pool to Table ====
  28. // Adds a new pool called "Weapons" to the loottable "lostcities:chests/lostcitychest"
  29. val lostCityChestsWeaponsPool = lostCityChests.addPool("Weapons", 1, 1, 1, 1);
  30.  
  31. //==== Create a new table ====
  32. val MyTable = LootTweaker.newTable("pjc21:mytable");
  33.  
  34. //==== Add pools to your table ====
  35. val mwWeapons = MyTable.addPool("MW_Weapons", 1, 1, 1, 1);
  36. val mwBullets = MyTable.addPool("MW_Bullets", 1, 1, 1, 1);
  37.  
  38. //==== Add entries to your table pools ====
  39. mwWeapons.addItemEntryHelper(<mw:glock_19>, 20, 1, [Functions.setCount(1, 1)], [], "glock_19");
  40. mwWeapons.addItemEntryHelper(<mw:uzi>, 20, 1, [Functions.setCount(1, 1)], [], "uzi");
  41. mwBullets.addItemEntryHelper(<mw:bullet9x19mm>, 20, 1, [Functions.setCount(10, 64)], [], "bullet9x19mm");
  42.  
  43. //==== Add your table as an entry to the Weapons pool ====
  44. lostCityChestsWeaponsPool.addLootTableEntry("pjc21:mytable", 20, "MW_Gear");
Add Comment
Please, Sign In to add comment