Brewing mod inter-compatibility

carryon-pedestal
copygirl 2 years ago
parent 8c476644da
commit f03f4cca6d
  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

@ -1,5 +1,6 @@
// priority: 100
// Add sawmill recipe (from Corail Woodcutter)
function sawmill(event, output, input) {
let i = Ingredient.of(input);
let o = Item.of(output);
@ -8,3 +9,22 @@ function sawmill(event, output, input) {
ingredient: i.toJson(), result: o.getId(), count: o.getCount()
});
}
// 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));
}

@ -0,0 +1,10 @@
// 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 });
});

@ -0,0 +1,29 @@
// 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" });
});
Loading…
Cancel
Save