Skip to content

Commit

Permalink
Fix kube.js scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepy-evelyn committed Nov 27, 2024
1 parent c191282 commit d2cb1f2
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 152 deletions.
2 changes: 1 addition & 1 deletion index.toml
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ hash = "d54f1fb3afc2f8560ee5032fe5684deee96de51e2e194fcee6f00b28c35f6c86"

[[files]]
file = "kubejs/server_scripts/tags.js"
hash = "bd528d9e9a3fe1568d346558e077823e97f06baf03e0ffde0113f39ac465871f"
hash = "0bebee8ed75bfdd72194e8df3c37097b1f8fb19244b8ec1f324f18275670a669"

[[files]]
file = "kubejs/startup_scripts/vivvys_arcane_arsenal.js"
Expand Down
294 changes: 144 additions & 150 deletions kubejs/server_scripts/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,140 @@ let non_movable = [

let bottomless_allow = ["create:honey", "milk:milk_fluid_block"];

const seasons = ["spring", "summer", "autumn", "winter"];

// Serene Seasons - Crop Block Tags
const blockCrops = {
spring: [
"farmersrespite:small_tea_bush",
"farmersrespite:tea_bush",
"promenade:blush_sakura_sapling",
"promenade:cotton_sakura_sapling",
"natures_spirit:fir_sapling",
"natures_spirit:willow_sapling",
"natures_spirit:aspen_sapling",
"natures_spirit:cypress_sapling",
"natures_spirit:saxual_sapling",
"natures_spirit:mahogany_sapling",
"natures_spirit:yellow_larch_sapling",
"natures_spirit:larch_sapling",
"promenade:blueberry_bush"
],
summer: [
"farmersrespite:small_tea_bush",
"farmersrespite:tea_bush",
"farmersrespite:coffee_bush",
"farmersrespite:coffee_bush_top",
"farmersrespite:coffee_stem",
"farmersrespite:coffee_stem_double",
"promenade:palm_sapling",
"natures_spirit:fir_sapling",
"natures_spirit:willow_sapling",
"natures_spirit:aspen_sapling",
"natures_spirit:olive_sapling",
"natures_spirit:ghaf_sapling",
"natures_spirit:cypress_sapling",
"natures_spirit:joshua_sapling",
"natures_spirit:palo_verde_sapling",
"natures_spirit:saxual_sapling",
"natures_spirit:mahogany_sapling",
"tropics:palm_sapling",
"natures_spirit:yellow_larch_sapling",
"natures_spirit:larch_sapling",
"promenade:blueberry_bush"
],
autumn: [
"farmersrespite:small_tea_bush",
"farmersrespite:tea_bush",
"minecraft:potatoes",
"promenade:sap_maple_sapling",
"promenade:vermilion_maple_sapling",
"promenade:fulvous_maple_sapling",
"promenade:mikado_maple_sapling",
"natures_spirit:fir_sapling",
"natures_spirit:aspen_sapling",
"natures_spirit:red_maple_sapling",
"natures_spirit:orange_maple_sapling",
"natures_spirit:yellow_maple_sapling",
"natures_spirit:mahogany_sapling"
],
yearRound: [
"spelunkery:conk_fungus",
"spelunkery:button_mushroom",
"spelunkery:inkcap_mushroom",
"spelunkery:white_inkcap_mushroom",
"spelunkery:shiitake_mushroom",
"natures_spirit:redwood_sapling",
"natures_spirit:sugi_sapling",
"natures_spirit:cedar_sapling",
"promenade:dark_amaranth_fungus"
]
};

// Serene Seasons - Crop Item Tags
const itemCrops = {
spring: [
"farmersrespite:tea_seeds",
"minecraft:beetroot_seeds",
"promenade:blush_sakura_sapling",
"promenade:cotton_sakura_sapling",
"natures_spirit:fir_sapling",
"natures_spirit:willow_sapling",
"natures_spirit:aspen_sapling",
"natures_spirit:cypress_sapling",
"natures_spirit:saxual_sapling",
"natures_spirit:mahogany_sapling",
"natures_spirit:yellow_larch_sapling",
"natures_spirit:larch_sapling",
"promenade:blueberries"
],
summer: [
"farmersrespite:tea_seeds",
"farmersrespite:coffee_berries",
"promenade:palm_sapling",
"natures_spirit:fir_sapling",
"natures_spirit:willow_sapling",
"natures_spirit:aspen_sapling",
"natures_spirit:olive_sapling",
"natures_spirit:ghaf_sapling",
"natures_spirit:cypress_sapling",
"natures_spirit:joshua_sapling",
"natures_spirit:palo_verde_sapling",
"natures_spirit:saxual_sapling",
"natures_spirit:mahogany_sapling",
"tropics:palm_sapling",
"natures_spirit:yellow_larch_sapling",
"natures_spirit:larch_sapling",
"promenade:blueberries"
],
autumn: [
"farmersrespite:tea_seeds",
"minecraft:potato",
"promenade:sap_maple_sapling",
"promenade:vermilion_maple_sapling",
"promenade:fulvous_maple_sapling",
"promenade:mikado_maple_sapling",
"natures_spirit:fir_sapling",
"natures_spirit:aspen_sapling",
"natures_spirit:red_maple_sapling",
"natures_spirit:orange_maple_sapling",
"natures_spirit:yellow_maple_sapling",
"natures_spirit:mahogany_sapling"
],
yearRound: [
"spelunkery:conk_fungus",
"spelunkery:phosphor_fungus",
"spelunkery:button_mushroom",
"spelunkery:inkcap_mushroom",
"promenade:dark_amaranth_fungus",
"spelunkery:white_inkcap_mushroom",
"spelunkery:shiitake_mushroom",
"natures_spirit:redwood_sapling",
"natures_spirit:sugi_sapling",
"natures_spirit:cedar_sapling"
]
}

ServerEvents.tags("block", (event) => {
better_end_chests.forEach((id) => {
event.add("lootr:convert/chests", id);
Expand All @@ -65,87 +199,15 @@ ServerEvents.tags("block", (event) => {
event.add("create:non_movable", id);
});

// Serene Seasons - Crop Block Tags
const crops = {
spring: [
"farmersrespite:small_tea_bush",
"farmersrespite:tea_bush",
"promenade:blush_sakura_sapling",
"promenade:cotton_sakura_sapling",
"natures_spirit:fir_sapling",
"natures_spirit:willow_sapling",
"natures_spirit:aspen_sapling",
"natures_spirit:cypress_sapling",
"natures_spirit:saxual_sapling",
"natures_spirit:mahogany_sapling",
"natures_spirit:yellow_larch_sapling",
"natures_spirit:larch_sapling",
"promenade:blueberry_bush"
],
summer: [
"farmersrespite:small_tea_bush",
"farmersrespite:tea_bush",
"farmersrespite:coffee_bush",
"farmersrespite:coffee_bush_top",
"farmersrespite:coffee_stem",
"farmersrespite:coffee_stem_double",
"promenade:palm_sapling",
"natures_spirit:fir_sapling",
"natures_spirit:willow_sapling",
"natures_spirit:aspen_sapling",
"natures_spirit:olive_sapling",
"natures_spirit:ghaf_sapling",
"natures_spirit:cypress_sapling",
"natures_spirit:joshua_sapling",
"natures_spirit:palo_verde_sapling",
"natures_spirit:saxual_sapling",
"natures_spirit:mahogany_sapling",
"tropics:palm_sapling",
"natures_spirit:yellow_larch_sapling",
"natures_spirit:larch_sapling",
"promenade:blueberry_bush"
],
autumn: [
"farmersrespite:small_tea_bush",
"farmersrespite:tea_bush",
"minecraft:potatoes",
"promenade:sap_maple_sapling",
"promenade:vermilion_maple_sapling",
"promenade:fulvous_maple_sapling",
"promenade:mikado_maple_sapling",
"natures_spirit:fir_sapling",
"natures_spirit:aspen_sapling",
"natures_spirit:red_maple_sapling",
"natures_spirit:orange_maple_sapling",
"natures_spirit:yellow_maple_sapling",
"natures_spirit:mahogany_sapling"
],
yearRound: [
"spelunkery:conk_fungus",
"spelunkery:button_mushroom",
"spelunkery:inkcap_mushroom",
"spelunkery:white_inkcap_mushroom",
"spelunkery:shiitake_mushroom",
"natures_spirit:redwood_sapling",
"natures_spirit:sugi_sapling",
"natures_spirit:cedar_sapling",
"promenade:dark_amaranth_fungus"
]
};

Object.entries(crops).forEach(([season, crops]) => {
Object.entries(blockCrops).forEach(([season, crops]) => {
crops.forEach((crop) => {
event.add(`sereneseasons:${season}_crops`, crop)
if (season === "yearRound")
seasons.forEach(season => event.add(`sereneseasons:${season}_crops`, crop));
else
event.add(`sereneseasons:${season}_crops`, crop)
});
});

crops.yearRound.forEach((crop) => {
event.add(`sereneseasons:spring_crops`, crop)
event.add(`sereneseasons:summer_crops`, crop)
event.add(`sereneseasons:autumn_crops`, crop)
event.add(`sereneseasons:winter_crops`, crop)
});

// Serene Seasons - Greenhouse Glass Block Tags
const colours = ["white", "light_gray", "gray", "black", "brown", "red", "orange", "yellow",
"lime", "green", "cyan", "light_blue", "blue", "purple", "magenta", "pink"];
Expand Down Expand Up @@ -186,84 +248,16 @@ ServerEvents.tags("item", (event) => {
event.add(`forge:plates/${material}`, `#c:${material}_plates`)
event.add(`forge:blocks/${material}`, `#c:${material}_blocks`)
});

// Serene Seasons - Crop Item Tags
const crops = {
spring: [
"farmersrespite:tea_seeds",
"minecraft:beetroot_seeds",
"promenade:blush_sakura_sapling",
"promenade:cotton_sakura_sapling",
"natures_spirit:fir_sapling",
"natures_spirit:willow_sapling",
"natures_spirit:aspen_sapling",
"natures_spirit:cypress_sapling",
"natures_spirit:saxual_sapling",
"natures_spirit:mahogany_sapling",
"natures_spirit:yellow_larch_sapling",
"natures_spirit:larch_sapling",
"promenade:blueberries"
],
summer: [
"farmersrespite:tea_seeds",
"farmersrespite:coffee_berries",
"promenade:palm_sapling",
"natures_spirit:fir_sapling",
"natures_spirit:willow_sapling",
"natures_spirit:aspen_sapling",
"natures_spirit:olive_sapling",
"natures_spirit:ghaf_sapling",
"natures_spirit:cypress_sapling",
"natures_spirit:joshua_sapling",
"natures_spirit:palo_verde_sapling",
"natures_spirit:saxual_sapling",
"natures_spirit:mahogany_sapling",
"tropics:palm_sapling",
"natures_spirit:yellow_larch_sapling",
"natures_spirit:larch_sapling",
"promenade:blueberries"
],
autumn: [
"farmersrespite:tea_seeds",
"minecraft:potato",
"promenade:sap_maple_sapling",
"promenade:vermilion_maple_sapling",
"promenade:fulvous_maple_sapling",
"promenade:mikado_maple_sapling",
"natures_spirit:fir_sapling",
"natures_spirit:aspen_sapling",
"natures_spirit:red_maple_sapling",
"natures_spirit:orange_maple_sapling",
"natures_spirit:yellow_maple_sapling",
"natures_spirit:mahogany_sapling"
],
yearRound: [
"spelunkery:conk_fungus",
"spelunkery:phosphor_fungus",
"spelunkery:button_mushroom",
"spelunkery:inkcap_mushroom",
"promenade:dark_amaranth_fungus",
"spelunkery:white_inkcap_mushroom",
"spelunkery:shiitake_mushroom",
"natures_spirit:redwood_sapling",
"natures_spirit:sugi_sapling",
"natures_spirit:cedar_sapling"
]
}

Object.entries(crops).forEach(([season, crops]) => {
Object.entries(itemCrops).forEach(([season, crops]) => {
crops.forEach((crop) => {
event.add(`sereneseasons:${season}_crops`, crop)
if (season === "yearRound")
seasons.forEach(season => event.add(`sereneseasons:${season}_crops`, crop))
else
event.add(`sereneseasons:${season}_crops`, crop)
});
});

crops.yearRound.forEach((crop) => {
event.add(`sereneseasons:spring_crops`, crop)
event.add(`sereneseasons:summer_crops`, crop)
event.add(`sereneseasons:autumn_crops`, crop)
event.add(`sereneseasons:winter_crops`, crop)
});

// Misc
event.add("c:seeds", "supplementaries:flax_seeds")
});
2 changes: 1 addition & 1 deletion pack.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0"
[index]
file = "index.toml"
hash-format = "sha256"
hash = "ebbec5118dac9b5c0b0238a6a37e3a2ad67428a9ff4bc6b2e5a4a0d9049291b2"
hash = "c033a204d94891e1ce3898dd2e665f63a32a1a24981f1b57d9d0b4be671de9af"

[versions]
fabric = "0.16.5"
Expand Down

0 comments on commit d2cb1f2

Please sign in to comment.