Improved NatProg compat
This commit is contained in:
parent
e3a2fd1de4
commit
8e9c12c98e
4 changed files with 151 additions and 413 deletions
|
|
@ -1,22 +1,57 @@
|
|||
// priority: 1024
|
||||
|
||||
onEvent("server.datapack.first", (_) => {
|
||||
global.minecraftColors = [
|
||||
"white",
|
||||
"orange",
|
||||
"magenta",
|
||||
"light_blue",
|
||||
"yellow",
|
||||
"lime",
|
||||
"pink",
|
||||
"gray",
|
||||
"light_gray",
|
||||
"cyan",
|
||||
"purple",
|
||||
"blue",
|
||||
"brown",
|
||||
"green",
|
||||
"red",
|
||||
"black",
|
||||
];
|
||||
global.minecraftColors = ["white", "orange", "magenta", "light_blue", "yellow", "lime", "pink", "gray", "light_gray", "cyan", "purple", "blue", "brown", "green", "red", "black"];
|
||||
|
||||
/* Creates */
|
||||
global.genNatProgRecipes = (base, stripped, planks) => {
|
||||
const stripLogWithSaw = {
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
tag: "natural-progression:saw",
|
||||
},
|
||||
{
|
||||
item: base,
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: stripped,
|
||||
},
|
||||
};
|
||||
|
||||
const planksFromStrippedAxe = {
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: stripped,
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:axe",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: planks,
|
||||
count: 1,
|
||||
},
|
||||
};
|
||||
|
||||
const planksFromStrippedSaw = {
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: stripped,
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:saw",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: planks,
|
||||
count: 4,
|
||||
},
|
||||
};
|
||||
|
||||
return [stripLogWithSaw, planksFromStrippedAxe, planksFromStrippedSaw];
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
onEvent("recipes", (event) => {
|
||||
const betterNetherWoods = [
|
||||
{
|
||||
log: "betternether:mushroom_fir_log",
|
||||
strippedLog: "betternether:striped_log_mushroom_fir",
|
||||
wood: "betternether:mushroom_fir_wood",
|
||||
strippedWood: "betternether:striped_wood_mushroom_fir",
|
||||
plank: "betternether:mushroom_fir_planks",
|
||||
},
|
||||
{
|
||||
log: "betternether:stalagnate_log",
|
||||
strippedLog: "betternether:striped_log_stalagnate",
|
||||
wood: "betternether:stalagnate_bark",
|
||||
strippedWood: "betternether:striped_bark_stalagnate",
|
||||
plank: "betternether:stalagnate_planks",
|
||||
},
|
||||
{
|
||||
log: "betternether:willow_log",
|
||||
strippedLog: "betternether:striped_log_willow",
|
||||
wood: "betternether:willow_bark",
|
||||
strippedWood: "betternether:striped_bark_willow",
|
||||
plank: "betternether:willow_planks",
|
||||
},
|
||||
{
|
||||
log: "betternether:nether_sakura_log",
|
||||
strippedLog: "betternether:striped_log_nether_sakura",
|
||||
wood: "betternether:nether_sakura_bark",
|
||||
strippedWood: "betternether:striped_bark_nether_sakura",
|
||||
plank: "betternether:nether_sakura_planks",
|
||||
},
|
||||
{
|
||||
log: "betternether:anchor_tree_log",
|
||||
strippedLog: "betternether:striped_log_anchor_tree",
|
||||
wood: "betternether:anchor_tree_bark",
|
||||
strippedWood: "betternether:striped_bark_anchor_tree",
|
||||
plank: "betternether:anchor_tree_planks",
|
||||
},
|
||||
{
|
||||
log: "betternether:rubeus_log",
|
||||
strippedLog: "betternether:striped_log_rubeus",
|
||||
wood: "betternether:rubeus_bark",
|
||||
strippedWood: "betternether:striped_bark_rubeus",
|
||||
plank: "betternether:rubeus_planks",
|
||||
},
|
||||
{
|
||||
log: "betternether:wart_log",
|
||||
strippedLog: "betternether:striped_log_wart",
|
||||
wood: "betternether:wart_bark",
|
||||
strippedWood: "betternether:striped_bark_wart",
|
||||
plank: "betternether:wart_planks",
|
||||
},
|
||||
];
|
||||
|
||||
betterNetherWoods.forEach((woodType) => {
|
||||
event.remove({ output: woodType.plank });
|
||||
global.genNatProgRecipes(woodType.log, woodType.strippedLog, woodType.plank).forEach((x) => event.custom(x));
|
||||
global.genNatProgRecipes(woodType.wood, woodType.strippedWood, woodType.plank).forEach((x) => event.custom(x));
|
||||
});
|
||||
});
|
||||
|
|
@ -9,399 +9,13 @@ onEvent("recipes", (event) => {
|
|||
id: "enhanced_mushrooms:crafting/glowshroom/glowshroom_planks",
|
||||
});
|
||||
|
||||
event.custom({
|
||||
conditions: [
|
||||
{
|
||||
type: "forge:mod_loaded",
|
||||
modid: "enhanced_mushrooms",
|
||||
},
|
||||
],
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: "enhanced_mushrooms:stripped_red_mushroom_stem",
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:saw",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: "enhanced_mushrooms:red_mushroom_planks",
|
||||
count: 4,
|
||||
},
|
||||
});
|
||||
|
||||
event.custom({
|
||||
conditions: [
|
||||
{
|
||||
type: "forge:mod_loaded",
|
||||
modid: "enhanced_mushrooms",
|
||||
},
|
||||
],
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: "enhanced_mushrooms:stripped_brown_mushroom_stem",
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:saw",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: "enhanced_mushrooms:brown_mushroom_planks",
|
||||
count: 4,
|
||||
},
|
||||
});
|
||||
|
||||
event.custom({
|
||||
conditions: [
|
||||
{
|
||||
type: "forge:mod_loaded",
|
||||
modid: "enhanced_mushrooms",
|
||||
},
|
||||
],
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: "enhanced_mushrooms:stripped_glowshroom_stem",
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:saw",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: "enhanced_mushrooms:glowshroom_planks",
|
||||
count: 4,
|
||||
},
|
||||
});
|
||||
|
||||
event.custom({
|
||||
conditions: [
|
||||
{
|
||||
type: "forge:mod_loaded",
|
||||
modid: "enhanced_mushrooms",
|
||||
},
|
||||
],
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: "enhanced_mushrooms:stripped_brown_mushroom_hyphae",
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:axe",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: "enhanced_mushrooms:brown_mushroom_planks",
|
||||
count: 1,
|
||||
},
|
||||
});
|
||||
|
||||
event.custom({
|
||||
conditions: [
|
||||
{
|
||||
type: "forge:mod_loaded",
|
||||
modid: "enhanced_mushrooms",
|
||||
},
|
||||
],
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: "enhanced_mushrooms:stripped_brown_mushroom_stem",
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:axe",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: "enhanced_mushrooms:brown_mushroom_planks",
|
||||
count: 1,
|
||||
},
|
||||
});
|
||||
|
||||
event.custom({
|
||||
conditions: [
|
||||
{
|
||||
type: "forge:mod_loaded",
|
||||
modid: "enhanced_mushrooms",
|
||||
},
|
||||
],
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: "enhanced_mushrooms:stripped_glowshroom_hyphae",
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:axe",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: "enhanced_mushrooms:glowshroom_planks",
|
||||
count: 1,
|
||||
},
|
||||
});
|
||||
|
||||
event.custom({
|
||||
conditions: [
|
||||
{
|
||||
type: "forge:mod_loaded",
|
||||
modid: "enhanced_mushrooms",
|
||||
},
|
||||
],
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: "enhanced_mushrooms:stripped_glowshroom_stem",
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:axe",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: "enhanced_mushrooms:glowshroom_planks",
|
||||
count: 1,
|
||||
},
|
||||
});
|
||||
|
||||
event.custom({
|
||||
conditions: [
|
||||
{
|
||||
type: "forge:mod_loaded",
|
||||
modid: "enhanced_mushrooms",
|
||||
},
|
||||
],
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: "enhanced_mushrooms:stripped_red_mushroom_hyphae",
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:axe",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: "enhanced_mushrooms:red_mushroom_planks",
|
||||
count: 1,
|
||||
},
|
||||
});
|
||||
|
||||
event.custom({
|
||||
conditions: [
|
||||
{
|
||||
type: "forge:mod_loaded",
|
||||
modid: "enhanced_mushrooms",
|
||||
},
|
||||
],
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: "enhanced_mushrooms:stripped_red_mushroom_stem",
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:axe",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: "enhanced_mushrooms:red_mushroom_planks",
|
||||
count: 1,
|
||||
},
|
||||
});
|
||||
|
||||
event.custom({
|
||||
conditions: [
|
||||
{
|
||||
type: "forge:mod_loaded",
|
||||
modid: "enhanced_mushrooms",
|
||||
},
|
||||
],
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: "enhanced_mushrooms:brown_mushroom_hyphae",
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:saw",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: "enhanced_mushrooms:stripped_brown_mushroom_hyphae",
|
||||
count: 1,
|
||||
},
|
||||
});
|
||||
|
||||
event.custom({
|
||||
conditions: [
|
||||
{
|
||||
type: "forge:mod_loaded",
|
||||
modid: "enhanced_mushrooms",
|
||||
},
|
||||
],
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: "enhanced_mushrooms:brown_mushroom_stem",
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:saw",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: "enhanced_mushrooms:stripped_brown_mushroom_stem",
|
||||
count: 1,
|
||||
},
|
||||
});
|
||||
|
||||
event.custom({
|
||||
conditions: [
|
||||
{
|
||||
type: "forge:mod_loaded",
|
||||
modid: "enhanced_mushrooms",
|
||||
},
|
||||
],
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: "enhanced_mushrooms:glowshroom_hyphae",
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:saw",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: "enhanced_mushrooms:stripped_glowshroom_hyphae",
|
||||
count: 1,
|
||||
},
|
||||
});
|
||||
|
||||
event.custom({
|
||||
conditions: [
|
||||
{
|
||||
type: "forge:mod_loaded",
|
||||
modid: "enhanced_mushrooms",
|
||||
},
|
||||
],
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: "enhanced_mushrooms:glowshroom_stem",
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:saw",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: "enhanced_mushrooms:stripped_glowshroom_stem",
|
||||
count: 1,
|
||||
},
|
||||
});
|
||||
|
||||
event.custom({
|
||||
conditions: [
|
||||
{
|
||||
type: "forge:mod_loaded",
|
||||
modid: "enhanced_mushrooms",
|
||||
},
|
||||
],
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: "enhanced_mushrooms:red_mushroom_hyphae",
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:saw",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: "enhanced_mushrooms:stripped_red_mushroom_hyphae",
|
||||
count: 1,
|
||||
},
|
||||
});
|
||||
|
||||
event.custom({
|
||||
conditions: [
|
||||
{
|
||||
type: "forge:mod_loaded",
|
||||
modid: "enhanced_mushrooms",
|
||||
},
|
||||
],
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: "enhanced_mushrooms:red_mushroom_stem",
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:saw",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: "enhanced_mushrooms:stripped_red_mushroom_stem",
|
||||
count: 1,
|
||||
},
|
||||
});
|
||||
|
||||
event.custom({
|
||||
conditions: [
|
||||
{
|
||||
type: "forge:mod_loaded",
|
||||
modid: "enhanced_mushrooms",
|
||||
},
|
||||
],
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: "enhanced_mushrooms:stripped_brown_mushroom_hyphae",
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:saw",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: "enhanced_mushrooms:brown_mushroom_planks",
|
||||
count: 4,
|
||||
},
|
||||
});
|
||||
|
||||
event.custom({
|
||||
conditions: [
|
||||
{
|
||||
type: "forge:mod_loaded",
|
||||
modid: "enhanced_mushrooms",
|
||||
},
|
||||
],
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: "enhanced_mushrooms:stripped_glowshroom_hyphae",
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:saw",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: "enhanced_mushrooms:glowshroom_planks",
|
||||
count: 4,
|
||||
},
|
||||
});
|
||||
|
||||
event.custom({
|
||||
conditions: [
|
||||
{
|
||||
type: "forge:mod_loaded",
|
||||
modid: "enhanced_mushrooms",
|
||||
},
|
||||
],
|
||||
type: "natural-progression:damage_tools",
|
||||
ingredients: [
|
||||
{
|
||||
item: "enhanced_mushrooms:stripped_red_mushroom_hyphae",
|
||||
},
|
||||
{
|
||||
tag: "natural-progression:saw",
|
||||
},
|
||||
],
|
||||
result: {
|
||||
item: "enhanced_mushrooms:red_mushroom_planks",
|
||||
count: 4,
|
||||
},
|
||||
});
|
||||
// Red Mushroom
|
||||
global.genNatProgRecipes("enhanced_mushrooms:red_mushroom_stem", "enhanced_mushrooms:stripped_red_mushroom_stem", "enhanced_mushrooms:red_mushroom_planks").forEach((x) => event.custom(x));
|
||||
global.genNatProgRecipes("enhanced_mushrooms:red_mushroom_hyphae", "enhanced_mushrooms:stripped_red_mushroom_hyphae", "enhanced_mushrooms:red_mushroom_planks").forEach((x) => event.custom(x));
|
||||
// Brown Mushroom
|
||||
global.genNatProgRecipes("enhanced_mushrooms:brown_mushroom_stem", "enhanced_mushrooms:stripped_brown_mushroom_stem", "enhanced_mushrooms:brown_mushroom_planks").forEach((x) => event.custom(x));
|
||||
global.genNatProgRecipes("enhanced_mushrooms:brown_mushroom_hyphae", "enhanced_mushrooms:stripped_brown_mushroom_hyphae", "enhanced_mushrooms:brown_mushroom_planks").forEach((x) => event.custom(x));
|
||||
// Glowshroom
|
||||
global.genNatProgRecipes("enhanced_mushrooms:glowshroom_stem", "enhanced_mushrooms:stripped_glowshroom_stem", "enhanced_mushrooms:glowshroom_planks").forEach((x) => event.custom(x));
|
||||
global.genNatProgRecipes("enhanced_mushrooms:glowshroom_hyphae", "enhanced_mushrooms:stripped_glowshroom_hyphae", "enhanced_mushrooms:glowshroom_planks").forEach((x) => event.custom(x));
|
||||
});
|
||||
|
|
|
|||
|
|
@ -95,4 +95,34 @@ onEvent("recipes", (event) => {
|
|||
count: 1,
|
||||
},
|
||||
});
|
||||
|
||||
const tconWoods = [
|
||||
{
|
||||
log: "tconstruct:greenheart_log",
|
||||
strippedLog: "tconstruct:stripped_greenheart_log",
|
||||
wood: "tconstruct:greenheart_wood",
|
||||
strippedWood: "tconstruct:stripped_greenheart_wood",
|
||||
plank: "tconstruct:greenheart_planks",
|
||||
},
|
||||
{
|
||||
log: "tconstruct:skyroot_log",
|
||||
strippedLog: "tconstruct:stripped_skyroot_log",
|
||||
wood: "tconstruct:skyroot_wood",
|
||||
strippedWood: "tconstruct:stripped_skyroot_wood",
|
||||
plank: "tconstruct:skyroot_planks",
|
||||
},
|
||||
{
|
||||
log: "tconstruct:bloodshroom_log",
|
||||
strippedLog: "tconstruct:stripped_bloodshroom_log",
|
||||
wood: "tconstruct:bloodshroom_wood",
|
||||
strippedWood: "tconstruct:stripped_bloodshroom_wood",
|
||||
plank: "tconstruct:bloodshroom_planks",
|
||||
},
|
||||
];
|
||||
|
||||
tconWoods.forEach((woodType) => {
|
||||
event.remove({ output: woodType.plank });
|
||||
global.genNatProgRecipes(woodType.log, woodType.strippedLog, woodType.plank).forEach((x) => event.custom(x));
|
||||
global.genNatProgRecipes(woodType.wood, woodType.strippedWood, woodType.plank).forEach((x) => event.custom(x));
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue