Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. val store_Default = "_store"; //The default store is ALWAYS called _store
  2. val store_Wheat = "Baker";
  3. val store_Diamond = "Diamond Trader";
  4.  
  5. //Set default store item
  6. mods.Delivery.Store.setStoreIcon(store_Default, <minecraft:redstone>); // "_store" is the name of the default store
  7.  
  8. //Add Some trades
  9. //These will go into the default tab as there is no store specified
  10. mods.Delivery.Store.addTrade(<minecraft:diamond> * 2).addOre("record", 5).addItem(<minecraft:apple>, <minecraft:golden_carrot> * 3);
  11. mods.Delivery.Store.addTrade(<minecraft:diamond> * 2).addOre("plankWood", 52);
  12. mods.Delivery.Store.addTrade(<minecraft:emerald> * 10, store_Default, <minecraft:stick> * 5, <minecraft:brick>).addOre("plankWood", 3).addItem(<minecraft:paper> * 2);
  13. mods.Delivery.Store.addTrade(<minecraft:brick> * 35, <minecraft:obsidian> * 5).addOre("plankWood", 1).addOre("ingotIron", 2);
  14. mods.Delivery.Store.addTrade(<minecraft:diamond> * 20, <minecraft:emerald>);
  15. mods.Delivery.Store.addTrade(<minecraft:diamond_pickaxe>).addOre("ingotGold", 5);
  16. mods.Delivery.Store.addTrade(<minecraft:wheat> * 20, <minecraft:diamond> * 5);
  17.  
  18. //Add some trades to the baker store
  19. mods.Delivery.Store.addTrade(<minecraft:wheat> * 20, store_Wheat, <minecraft:diamond> * 5);
  20. mods.Delivery.Store.addTrade(<minecraft:bread> * 4, store_Wheat).addOre("netherStar", 4).addItem(<minecraft:sugar>);
  21. mods.Delivery.Store.addTrade(<minecraft:emerald> * 2, store_Wheat, <minecraft:wheat> * 10);
  22.  
  23. //Add some trades to the diamond trader
  24. //Some of these require a gamestage
  25. mods.Delivery.Store.addTrade("gs_buydiamond_1", <minecraft:diamond> * 20, store_Diamond, <minecraft:emerald> * 5);
  26. mods.Delivery.Store.addTrade("gs_buydiamond_2", <minecraft:diamond> * 25, store_Diamond, <minecraft:stick> * 45);
  27. mods.Delivery.Store.addTrade(<minecraft:diamond>, store_Diamond, <minecraft:stick> * 64);
  28. mods.Delivery.Store.addTrade(<minecraft:emerald>, store_Diamond).addOre("gemDiamond", 4);
  29.  
  30. //You can set the store iron at any time
  31. //The order that the store is first accessed is the order they will appear in the tabs
  32. //The exception to this is the default tab, which will always be first.
  33. mods.Delivery.Store.setStoreIcon(store_Wheat, <minecraft:wheat>);
  34. mods.Delivery.Store.setStoreIcon(store_Diamond, <minecraft:diamond>);
  35.  
  36. //Notes
  37. /*
  38. * Stores are automatically created when they are first referenced.
  39. * If a store icon is not set, it will default to an emerald
  40. * The default store can be referenced with the id "_store"
  41. * The default store display name can be edited in the delivery config file
  42. * You can NOT create an ore dictionary entry with <ore:X>, this is a limitation with CraftTweaker and MC, use .addOre()
  43. */
  44.  
  45. //Method Reference
  46. /*
  47. ~~Add Trade Methods~~
  48. //Methods adding to default store
  49. mods.Delivery.Store.addTrade(IItemStack result, IIngredient... inputs)
  50. mods.Delivery.Store.addTrade(String gamestage, IItemStack result, IIngredient... inputs)
  51. mods.Delivery.Store.addTrade(IItemStack result)
  52. mods.Delivery.Store.addTrade(String gamestage, IItemStack result)
  53.  
  54. //Methods adding to custom store
  55. mods.Delivery.Store.addTrade(IItemStack result, String store, IIngredient... inputs)
  56. mods.Delivery.Store.addTrade(String gamestage, IItemStack result, String store, IIngredient... inputs)
  57. mods.Delivery.Store.addTrade(IItemStack result, String store)
  58. mods.Delivery.Store.addTrade(String gamestage, IItemStack result, String store)
  59.  
  60. ~~ALL "addTrade" methods return a "Trade", which can be chained with the following methods~~
  61. addOre(String dict, int size)
  62. addItem(IItemStack... stacks)
  63. addIngredient(Ingredient ingredient)
  64.  
  65. ~~ALL of those addX methods also return a "Trade", this allows method chaining EG:
  66. mods.Delivery.Store.addTrade(IItemStack result, String store).addOre(String dict, int size).addItem(IItemStack... stacks)
  67.  
  68. ~~Other Methods~~
  69. mods.Delivery.Store.setStoreIcon(String storeName, IItemStack storeIcon) //Doesn't return anything
  70. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement