Code reformat, cleanup

This commit is contained in:
oitsjustjose 2022-01-31 08:57:45 -06:00
commit 14f6b71e78
71 changed files with 4369 additions and 3704 deletions

View file

@ -1,27 +1,35 @@
onEvent("recipes", (event) => {
const tiers = ["", "_tier_1", "_tier_2", "_tier_3"];
const tierItems = ["", "minecraft:iron_ingot", "minecraft:gold_ingot", "minecraft:diamond"];
const storageTypes = ["chest", "barrel"];
const woodTypes = ["oak", "spruce", "birch", "acacia", "jungle", "dark_oak", "crimson", "warped"];
onEvent('recipes', event => {
const tiers = ['', '_tier_1', '_tier_2', '_tier_3'];
const tierItems = ['', 'minecraft:iron_ingot', 'minecraft:gold_ingot', 'minecraft:diamond'];
const storageTypes = ['chest', 'barrel'];
const woodTypes = ['oak', 'spruce', 'birch', 'acacia', 'jungle', 'dark_oak', 'crimson', 'warped'];
woodTypes.forEach((wood) => {
woodTypes.forEach(wood => {
tiers.forEach((tier, idx) => {
if (idx < tiers.length - 1) {
storageTypes.forEach((store) => {
console.log(`storage_overhaul:${wood}_${store}${tier} + ${tierItems[idx + 1]} = storage_overhaul:${wood}_${store}${tiers[idx + 1]}`);
storageTypes.forEach(store => {
const left = Ingredient.of(`storage_overhaul:${wood}_${store}${tier}`);
const right = Ingredient.of(tierItems[idx + 1]);
const out = Item.of(`storage_overhaul:${wood}_${store}${tiers[idx + 1]}`);
global.genCombinedRecipe(event, left, right, out);
});
global.genCombinedRecipe(event, Ingredient.of("#forge:chests/wooden"), Ingredient.of("#forge:ingots/iron"), Item.of("storage_overhaul:oak_chest_tier_1"));
global.genCombinedRecipe(
event,
Ingredient.of('#forge:chests/wooden'),
Ingredient.of('#forge:ingots/iron'),
Item.of('storage_overhaul:oak_chest_tier_1')
);
}
});
});
global.minecraftColors.forEach((color) => {
global.genCombinedRecipe(event, Ingredient.of(`minecraft:${color}_shulker_box`), Ingredient.of("#forge:ingots/iron"), Item.of(`storage_overhaul:${color}_shulker_box`));
global.minecraftColors.forEach(color => {
global.genCombinedRecipe(
event,
Ingredient.of(`minecraft:${color}_shulker_box`),
Ingredient.of('#forge:ingots/iron'),
Item.of(`storage_overhaul:${color}_shulker_box`)
);
});
});