Merge kettle brewing into single file

pull/1/head
copygirl 2 years ago
parent c27e40b494
commit ae095c7f23
  1. 20
      kubejs/server_scripts/_global.js
  2. 10
      kubejs/server_scripts/recipes/adorn_uses_kettle.js
  3. 29
      kubejs/server_scripts/recipes/brewing.js
  4. 56
      kubejs/server_scripts/recipes/kettle_brewing.js

@ -1,20 +0,0 @@
// priority: 100
// Add brewing recipe (from Farmer's Respite)
// "brewingtime" tends to be 100 for simple recipes, 2400 for things that need to be brewed
// "needwater" can be set to false if liquid is already supplied
function brewing(event, output, inputs, options) {
let i = inputs.map(input => Ingredient.of(input).toJson());
let o = Item.of(output).toJson();
if (options && options.container)
options.container = Ingredient.of(options.container).toJson();
event.custom(Object.assign({
type: "farmersrespite:brewing",
ingredients: i,
result: o,
container: { item: "minecraft:glass_bottle" },
experience: 0.35,
brewingtime: 2400,
needwater: true,
}, options));
}

@ -1,10 +0,0 @@
// priority: 0
onEvent("recipes", event => {
event.remove({ output: "adorn:brewer" });
brewing(event, "adorn:hot_chocolate" , [ "minecraft:cocoa_beans" , "#forge:milk" ], { container: "adorn:mug", brewingtime: 100, needwater: false });
brewing(event, "adorn:sweet_berry_juice" , [ "minecraft:sweet_berries", "minecraft:sugar" ], { container: "adorn:mug" });
brewing(event, "adorn:glow_berry_tea" , [ "minecraft:glow_berries" , "#farmersrespite:tea_leaves" ], { container: "adorn:mug" });
brewing(event, "adorn:nether_wart_coffee", [ "minecraft:nether_wart" , "#forge:milk" ], { container: "adorn:mug", needwater: false });
});

@ -1,29 +0,0 @@
// priority: 0
onEvent("recipes", event => {
event.remove({ output: "twilightdelight:thorn_rose_tea" });
event.remove({ output: "twilightdelight:torchberry_juice" });
event.remove({ output: "twilightdelight:twilight_spring" });
event.remove({ output: "twilightdelight:phytochemical_juice" });
event.remove({ output: "twilightdelight:tear_drink" });
event.remove({ output: "twilightdelight:glacier_ice_tea" });
brewing(event, "twilightdelight:thorn_rose_tea" , [ "twilightforest:thorn_rose" , "minecraft:sugar" ]);
brewing(event, "twilightdelight:torchberry_juice" , [ "twilightforest:torchberries" , "minecraft:sugar" ]);
brewing(event, "twilightdelight:twilight_spring" , [ "twilightforest:raw_ironwood" , "minecraft:ice" ], { needwater: false });
brewing(event, "twilightdelight:phytochemical_juice", [ "twilightforest:steeleaf_ingot", "twilightforest:liveroot" ]);
brewing(event, "twilightdelight:tear_drink" , [ "twilightforest:fiery_tears" , "minecraft:ghast_tear" ]);
brewing(event, "twilightdelight:glacier_ice_tea" , [ "twilightforest:ice_bomb" , "minecraft:ice" ], { needwater: false });
event.remove({ output: "corn_delight:creamy_corn_drink" });
brewing(event, "corn_delight:creamy_corn_drink", [ "corn_delight:corn", "minecraft:sugar" ],
{ container: "farmersdelight:milk_bottle", brewingtime: 100, needwater: false });
event.remove({ id: "twilightdelight:cooking/builders_tea" });
brewing(event, "create:builders_tea", [ "#farmersrespite:tea_leaves", "#forge:milk" ]);
brewing(event, "create_confectionery:hot_chocolate_bottle", [ "create_confectionery:cocoa_powder", "minecraft:sugar" ],
{ container: "farmersdelight:milk_bottle", brewingtime: 100, needwater: false });
// Added by Farmer's Respite
event.remove({ id: "farmersdelight:cooking/hot_cocoa" });
event.remove({ id: "farmersdelight:cooking/apple_cider" });
});

@ -0,0 +1,56 @@
// priority: 0
onEvent("recipes", event => {
function brewing(output, inputs, options) {
let i = inputs.map(input => Ingredient.of(input).toJson());
let o = Item.of(output).toJson();
if (options && options.container)
options.container = Ingredient.of(options.container).toJson();
event.custom(Object.assign({
type: "farmersrespite:brewing",
ingredients: i,
result: o,
container: { item: "minecraft:glass_bottle" },
experience: 0.35,
brewingtime: 2400,
needwater: true,
}, options));
}
// Twilight Delight
event.remove({ output: "twilightdelight:thorn_rose_tea" });
event.remove({ output: "twilightdelight:torchberry_juice" });
event.remove({ output: "twilightdelight:twilight_spring" });
event.remove({ output: "twilightdelight:phytochemical_juice" });
event.remove({ output: "twilightdelight:tear_drink" });
event.remove({ output: "twilightdelight:glacier_ice_tea" });
brewing("twilightdelight:thorn_rose_tea" , [ "twilightforest:thorn_rose" , "minecraft:sugar" ]);
brewing("twilightdelight:torchberry_juice" , [ "twilightforest:torchberries" , "minecraft:sugar" ]);
brewing("twilightdelight:twilight_spring" , [ "twilightforest:raw_ironwood" , "minecraft:ice" ], { needwater: false });
brewing("twilightdelight:phytochemical_juice", [ "twilightforest:steeleaf_ingot", "twilightforest:liveroot" ]);
brewing("twilightdelight:tear_drink" , [ "twilightforest:fiery_tears" , "minecraft:ghast_tear" ]);
brewing("twilightdelight:glacier_ice_tea" , [ "twilightforest:ice_bomb" , "minecraft:ice" ], { needwater: false });
// Corn Delight
event.remove({ output: "corn_delight:creamy_corn_drink" });
brewing("corn_delight:creamy_corn_drink", [ "corn_delight:corn", "minecraft:sugar" ],
{ container: "farmersdelight:milk_bottle", brewingtime: 100, needwater: false });
// Create / Create Confectionery
event.remove({ id: "twilightdelight:cooking/builders_tea" });
brewing("create:builders_tea", [ "#farmersrespite:tea_leaves", "#forge:milk" ]);
brewing("create_confectionery:hot_chocolate_bottle", [ "create_confectionery:cocoa_powder", "minecraft:sugar" ],
{ container: "farmersdelight:milk_bottle", brewingtime: 100, needwater: false });
// Farmer's Delight
event.remove({ id: "farmersdelight:cooking/hot_cocoa" });
event.remove({ id: "farmersdelight:cooking/apple_cider" });
// Farmer's Respite already adds brewing recipes for these.
// Adorn
event.remove({ output: "adorn:brewer" });
brewing("adorn:hot_chocolate" , [ "minecraft:cocoa_beans" , "#forge:milk" ], { container: "adorn:mug", brewingtime: 100, needwater: false });
brewing("adorn:sweet_berry_juice" , [ "minecraft:sweet_berries", "minecraft:sugar" ], { container: "adorn:mug" });
brewing("adorn:glow_berry_tea" , [ "minecraft:glow_berries" , "#farmersrespite:tea_leaves" ], { container: "adorn:mug" });
brewing("adorn:nether_wart_coffee", [ "minecraft:nether_wart" , "#forge:milk" ], { container: "adorn:mug", needwater: false });
});
Loading…
Cancel
Save