Improve compatibility for woodcutter

This commit is contained in:
oitsjustjose 2022-02-26 18:56:57 -06:00
commit b315ce52d3
28 changed files with 601 additions and 218 deletions

View file

@ -1,88 +0,0 @@
{
"type": "minecraft:chest",
"pools": [
{
"rolls": {
"min": 0.0,
"max": 1.0,
"type": "minecraft:uniform"
},
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:iron_horse_armor"
},
{
"type": "minecraft:item",
"name": "minecraft:golden_horse_armor"
},
{
"type": "minecraft:item",
"name": "minecraft:diamond_horse_armor"
}
]
},
{
"rolls": {
"min": 1.0,
"max": 1.0,
"type": "minecraft:uniform"
},
"entries": [
{
"type": "minecraft:item",
"name": "atmospheric:rosewood_sapling"
},
{
"type": "minecraft:item",
"name": "atmospheric:morado_sapling"
},
{
"type": "minecraft:item",
"name": "atmospheric:aspen_sapling"
}
]
},
{
"rolls": {
"min": 1.0,
"max": 4.0,
"type": "minecraft:uniform"
},
"entries": [
{
"type": "minecraft:item",
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 2.0,
"max": 15.0,
"type": "minecraft:uniform"
}
}
],
"name": "emendatusenigmatica:gold_chunk"
},
{
"type": "minecraft:item",
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 1.0,
"max": 5.0,
"type": "minecraft:uniform"
}
}
],
"name": "atmospheric:aloe_gel_bottle"
},
{
"type": "minecraft:item",
"name": "atmospheric:yucca_branch"
}
]
}
]
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "storagedrawers"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "storagedrawers:acacia_trim"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"tag": "minecraft:acacia_logs"
},
"result": "storagedrawers:acacia_trim",
"count": 4
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "storagedrawers"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "storagedrawers:acacia_trim"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"item": "minecraft:acacia_planks"
},
"result": "storagedrawers:acacia_trim",
"count": 1
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "storagedrawers"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "storagedrawers:birch_trim"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"tag": "minecraft:birch_logs"
},
"result": "storagedrawers:birch_trim",
"count": 4
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "storagedrawers"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "storagedrawers:birch_trim"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"item": "minecraft:birch_planks"
},
"result": "storagedrawers:birch_trim",
"count": 1
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "storagedrawers"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "storagedrawers:crimson_trim"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"item": "minecraft:crimson_planks"
},
"result": "storagedrawers:crimson_trim",
"count": 1
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "storagedrawers"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "storagedrawers:crimson_trim"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"tag": "minecraft:crimson_stems"
},
"result": "storagedrawers:crimson_trim",
"count": 4
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "farmersdelight"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "farmersdelight:cutting_board"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"tag": "minecraft:logs"
},
"result": "farmersdelight:cutting_board",
"count": 1
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "storagedrawers"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "storagedrawers:dark_oak_trim"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"tag": "minecraft:dark_oak_logs"
},
"result": "storagedrawers:dark_oak_trim",
"count": 4
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "storagedrawers"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "storagedrawers:dark_oak_trim"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"item": "minecraft:dark_oak_planks"
},
"result": "storagedrawers:dark_oak_trim",
"count": 1
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "supplementaries"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "supplementaries:item_shelf"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"tag": "minecraft:logs"
},
"result": "supplementaries:item_shelf",
"count": 4
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "supplementaries"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "supplementaries:item_shelf"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"tag": "minecraft:planks"
},
"result": "supplementaries:item_shelf",
"count": 1
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "storagedrawers"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "storagedrawers:jungle_trim"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"tag": "minecraft:jungle_logs"
},
"result": "storagedrawers:jungle_trim",
"count": 4
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "storagedrawers"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "storagedrawers:jungle_trim"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"item": "minecraft:jungle_planks"
},
"result": "storagedrawers:jungle_trim",
"count": 1
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "storagedrawers"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "storagedrawers:oak_trim"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"tag": "minecraft:oak_logs"
},
"result": "storagedrawers:oak_trim",
"count": 4
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "storagedrawers"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "storagedrawers:oak_trim"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"item": "minecraft:oak_planks"
},
"result": "storagedrawers:oak_trim",
"count": 1
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "storagedrawers"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "storagedrawers:spruce_trim"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"tag": "minecraft:spruce_logs"
},
"result": "storagedrawers:spruce_trim",
"count": 4
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "storagedrawers"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "storagedrawers:spruce_trim"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"item": "minecraft:spruce_planks"
},
"result": "storagedrawers:spruce_trim",
"count": 1
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "supplementaries"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "supplementaries:timber_brace"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"tag": "minecraft:logs"
},
"result": "supplementaries:timber_brace",
"count": 4
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "supplementaries"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "supplementaries:timber_brace"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"tag": "minecraft:planks"
},
"result": "supplementaries:timber_brace",
"count": 1
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "supplementaries"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "supplementaries:timber_cross_brace"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"tag": "minecraft:logs"
},
"result": "supplementaries:timber_cross_brace",
"count": 4
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "supplementaries"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "supplementaries:timber_cross_brace"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"tag": "minecraft:planks"
},
"result": "supplementaries:timber_cross_brace",
"count": 1
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "supplementaries"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "supplementaries:timber_frame"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"tag": "minecraft:logs"
},
"result": "supplementaries:timber_frame",
"count": 4
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "supplementaries"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "supplementaries:timber_frame"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"tag": "minecraft:planks"
},
"result": "supplementaries:timber_frame",
"count": 1
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "storagedrawers"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "storagedrawers:warped_trim"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"item": "minecraft:warped_planks"
},
"result": "storagedrawers:warped_trim",
"count": 1
}

View file

@ -0,0 +1,22 @@
{
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "storagedrawers"
},
{
"type": "forge:mod_loaded",
"modid": "corail_woodcutter"
},
{
"type": "forge:item_exists",
"item": "storagedrawers:warped_trim"
}
],
"type": "corail_woodcutter:woodcutting",
"ingredient": {
"tag": "minecraft:warped_stems"
},
"result": "storagedrawers:warped_trim",
"count": 4
}

View file

@ -311,29 +311,18 @@ const woodcutter = event => {
{type: 'trapdoor', qty: 2}, {type: 'trapdoor', qty: 2},
].forEach(x => { ].forEach(x => {
const {type, qty} = x; const {type, qty} = x;
event.custom({
type: 'corail_woodcutter:woodcutting', // Checks that the generated item exists
ingredient: { if (`${Item.of(`${wood}_${type}`)}` !== 'Item.empty') {
item: `${wood}_planks`, event.custom({
}, type: 'corail_woodcutter:woodcutting',
result: `${wood}_${type}`, ingredient: {
count: qty, item: `${wood}_planks`,
conditions: [
{
type: 'forge:mod_loaded',
modid: 'corail_woodcutter',
}, },
{ result: `${wood}_${type}`,
type: 'forge:mod_loaded', count: qty,
modid: wood.split(':')[0], });
}, }
{
// Check that the generated item actually exists
type: 'forge:item_exists',
item: `${wood}_${type}`,
},
],
});
}); });
}); });
@ -350,36 +339,25 @@ const woodcutter = event => {
'upgrade_aquatic:driftwood_logs', 'upgrade_aquatic:driftwood_logs',
'upgrade_aquatic:river_logs', 'upgrade_aquatic:river_logs',
].forEach(wood => { ].forEach(wood => {
const [modid, path] = wood.split(':'); const [_, path] = wood.split(':');
[ [
{type: 'beam', qty: 1}, {type: 'beam', qty: 1},
{type: 'palisade', qty: 4}, {type: 'palisade', qty: 4},
].forEach(x => { ].forEach(x => {
const {type, qty} = x; const {type, qty} = x;
const output = `decorative_blocks_abnormals:${path}_${type}` const output = `decorative_blocks_abnormals:${path}_${type}`
.replace('_logs', '') .replace('_logs', '')
.replace('_stems', ''); .replace('_stems', '');
event.custom({
type: 'corail_woodcutter:woodcutting', if (`${Item.of(output)}` !== 'Item.empty') {
ingredient: {tag: wood}, event.custom({
result: output, type: 'corail_woodcutter:woodcutting',
count: qty, ingredient: {tag: wood},
conditions: [ result: output,
{ count: qty,
type: 'forge:mod_loaded', });
modid: 'corail_woodcutter', }
},
{
type: 'forge:mod_loaded',
modid: modid,
},
{
// Check that the generated item actually exists
type: 'forge:item_exists',
item: output,
},
],
});
}); });
}); });
@ -396,83 +374,40 @@ const woodcutter = event => {
'upgrade_aquatic:driftwood_planks', 'upgrade_aquatic:driftwood_planks',
'upgrade_aquatic:river_planks', 'upgrade_aquatic:river_planks',
].forEach(wood => { ].forEach(wood => {
const [modid, path] = wood.split(':'); const [_, path] = wood.split(':');
[ [
{type: 'seat', qty: 1}, {type: 'seat', qty: 1},
{type: 'support', qty: 1}, {type: 'support', qty: 1},
].forEach(x => { ].forEach(x => {
const {type, qty} = x; const {type, qty} = x;
const output = `decorative_blocks_abnormals:${path}_${type}`.replace('_planks', ''); const output = `decorative_blocks_abnormals:${path}_${type}`.replace('_planks', '');
event.custom({
type: 'corail_woodcutter:woodcutting', if (`${Item.of(output)}` !== 'Item.empty') {
ingredient: {item: wood}, event.custom({
result: output, type: 'corail_woodcutter:woodcutting',
count: qty, ingredient: {item: wood},
conditions: [ result: output,
{ count: qty,
type: 'forge:mod_loaded', });
modid: 'corail_woodcutter', }
},
{
type: 'forge:mod_loaded',
modid: modid,
},
{
// Check that the generated item actually exists
type: 'forge:item_exists',
item: output,
},
],
});
}); });
}); });
/* IE Compat */ /* IE Compat */
[ [
{ {result: 'immersiveengineering:treated_wood_horizontal', count: 1},
result: 'immersiveengineering:treated_wood_horizontal', {result: 'immersiveengineering:slab_treated_wood_horizontal', count: 2},
count: 1, {result: 'immersiveengineering:stairs_treated_wood_horizontal', count: 1},
}, {result: 'immersiveengineering:treated_wood_vertical', count: 1},
{ {result: 'immersiveengineering:slab_treated_wood_vertical', count: 2},
result: 'immersiveengineering:slab_treated_wood_horizontal', {result: 'immersiveengineering:stairs_treated_wood_vertical', count: 1},
count: 2, {result: 'immersiveengineering:treated_wood_packaged', count: 1},
}, {result: 'immersiveengineering:slab_treated_wood_packaged', count: 2},
{ {result: 'immersiveengineering:stairs_treated_wood_packaged', count: 1},
result: 'immersiveengineering:stairs_treated_wood_horizontal', {result: 'immersiveengineering:treated_fence', count: 1},
count: 1, {result: 'immersiveengineering:treated_scaffold', count: 1},
}, {result: 'immersiveengineering:waterwheel_segment', count: 1},
{ {result: 'immersiveengineering:windmill_blade', count: 1},
result: 'immersiveengineering:treated_wood_vertical',
count: 1,
},
{
result: 'immersiveengineering:slab_treated_wood_vertical',
count: 2,
},
{
result: 'immersiveengineering:stairs_treated_wood_vertical',
count: 1,
},
{
result: 'immersiveengineering:treated_wood_packaged',
count: 1,
},
{
result: 'immersiveengineering:slab_treated_wood_packaged',
count: 2,
},
{
result: 'immersiveengineering:stairs_treated_wood_packaged',
count: 1,
},
{
result: 'immersiveengineering:treated_fence',
count: 1,
},
{
result: 'immersiveengineering:treated_scaffold',
count: 1,
},
].forEach(recipe => { ].forEach(recipe => {
const {result, count} = recipe; const {result, count} = recipe;
event.custom({ event.custom({
@ -509,12 +444,12 @@ onEvent('recipes', event => {
}); });
event.custom({ event.custom({
type: "appliedenergistics2:inscriber", type: 'appliedenergistics2:inscriber',
mode: "press", mode: 'press',
result: { item: "kubejs:fluxed_singularity" }, result: {item: 'kubejs:fluxed_singularity'},
ingredients: { ingredients: {
top: { item: "kubejs:ender_singularity" }, top: {item: 'kubejs:ender_singularity'},
middle: { item: "appliedenergistics2:purified_fluix_crystal" } middle: {item: 'appliedenergistics2:purified_fluix_crystal'},
} },
}); });
}); });

View file

@ -106,20 +106,6 @@ onEvent('recipes', event => {
{item: `${modid}:watermill`} {item: `${modid}:watermill`}
); );
event.custom({
type: 'corail_woodcutter:woodcutting',
ingredient: {tag: 'forge:treated_wood'},
result: `${modid}:waterwheel_segment`,
count: 1,
});
event.custom({
type: 'corail_woodcutter:woodcutting',
ingredient: {tag: 'forge:treated_wood'},
result: `${modid}:windmill_blade`,
count: 1,
});
// Fixes some IE machines not being able to be created // Fixes some IE machines not being able to be created
event.stonecutting('immersiveengineering:storage_steel', 'emendatusenigmatica:steel_block'); event.stonecutting('immersiveengineering:storage_steel', 'emendatusenigmatica:steel_block');
event.stonecutting('emendatusenigmatica:steel_block', 'immersiveengineering:storage_steel'); event.stonecutting('emendatusenigmatica:steel_block', 'immersiveengineering:storage_steel');