add Ender Singularity, all smithing automatable
This commit is contained in:
parent
d363261480
commit
09a4821c41
24 changed files with 166 additions and 152 deletions
|
|
@ -54,4 +54,39 @@ onEvent("server.datapack.first", (_) => {
|
|||
|
||||
return [stripLogWithSaw, planksFromStrippedAxe, planksFromStrippedSaw];
|
||||
};
|
||||
|
||||
global.genCombinedRecipe = (evt, left, right, output) => {
|
||||
const leftInput = left.includes("#") ? { tag: left.replace(/#/g, "") } : { item: left };
|
||||
const rightInput = right.includes("#") ? { tag: right.replace(/#/g, "") } : { item: right };
|
||||
|
||||
evt.smithing(output, left, right);
|
||||
evt.custom({
|
||||
type: "mekanism:combining",
|
||||
mainInput: { ingredient: leftInput },
|
||||
extraInput: { amount: 1, ingredient: rightInput },
|
||||
output: { item: output },
|
||||
});
|
||||
};
|
||||
|
||||
global.genCombinedRecipeSewing = (evt, left, right, output, spoolCt) => {
|
||||
const main = JSON.parse(left.toJson());
|
||||
const extra = JSON.parse(right.toJson());
|
||||
|
||||
evt.custom({
|
||||
type: "improvedbackpacks:sewing",
|
||||
first: main.ingredient || main,
|
||||
first_count: left.getCount(),
|
||||
second: extra.ingredient || extra,
|
||||
second_count: right.getCount(),
|
||||
spools_count: parseInt(spoolCt),
|
||||
result: output.getId(),
|
||||
});
|
||||
|
||||
evt.custom({
|
||||
type: "mekanism:combining",
|
||||
mainInput: main,
|
||||
extraInput: extra,
|
||||
output: output.toResultJson(),
|
||||
});
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue