Skip to content

Commit

Permalink
fix: aseebly recipes will now use incomplete items from the same mod,…
Browse files Browse the repository at this point in the history
… then fallback to incomplete items from ptdye, then fall back on incomplete assembly or input item
  • Loading branch information
Yarden-zamir committed Feb 3, 2024
1 parent 963c622 commit 9cd24a2
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions kubejs/server_scripts/base/featrues/devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ if (
"supplementaries:spring_launcher",
"botania:apothecary_default",
"ptdyeplus:crate_barrel",
"ptdyeplus:barrel_barrel"
"ptdyeplus:barrel_barrel",
],
},
{
Expand Down Expand Up @@ -388,14 +388,23 @@ if (
addToTag("forge:devices/generics", device.generic);
let generic_id = Item.of(device.generic).id; //support both ids and kjs items

device.incomplete =
device.incomplete ||
generic_id.split(":")[0] + ":incomplete_" + generic_id.split(":")[1];
if (!device.incomplete) {
let incomplete =
generic_id.split(":")[0] + ":incomplete_" + generic_id.split(":")[1];
if (Item.of(incomplete).isEmpty()) {
incomplete = `ptdye:incomplete_${generic_id.split(":")[1]}`;
}
if (Item.of(incomplete).isEmpty()) {
incomplete = 'create:incomplete_precision_mechanism'
}
device.incomplete = incomplete;
}
device.base = device.base || "create:cogwheel";

device.assembly_loops = device.assembly_loops || undefined;
device.tag = device.tag.startsWith("#") ? device.tag : "#" + device.tag;
device.convert_back_recipe = device.convert_back_recipe==false?false:true;
device.convert_back_recipe =
device.convert_back_recipe == false ? false : true;
//device recipe
if (device.assembly) {
if (!Array.isArray(device.assembly[0])) {
Expand Down

0 comments on commit 9cd24a2

Please sign in to comment.