Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 4 additions & 66 deletions config/ftbquests/quests/chapters/market.snbt
Original file line number Diff line number Diff line change
Expand Up @@ -90,24 +90,7 @@
id: "4F953BACF4D1C151"
rewards: [{
id: "56DB21D18FB1FF64"
item: {
Count: 1
id: "cb_microblock:diamond_saw"
tag: {
Damage: 0
Enchantments: [{
id: "minecraft:unbreaking"
lvl: 10s
}]
HideFlags: 1
RepairCost: 0
Unbreakable: 1
display: {
Lore: ["{\"text\":\"Do not use in manual crafting\"}"]
Name: "{\"text\":\"Enchanted Saw\",\"color\":\"gold\",\"italic\":false}"
}
}
}
item: "kubejs:enchanted_saw"
type: "item"
}]
subtitle: "{cabin.quest.4F953BACF4D1C151.subtitle}"
Expand Down Expand Up @@ -151,22 +134,7 @@
id: "72CACE8F0E4701B1"
rewards: [{
id: "743730BBE32A0875"
item: {
Count: 1
id: "projectred_core:screwdriver"
tag: {
Damage: 0
Enchantments: [{
id: "minecraft:unbreaking"
lvl: 10s
}]
HideFlags: 1
Unbreakable: 1
display: {
Name: "{\"text\":\"Enchanted Screwdriver\",\"color\":\"gold\",\"italic\":false}"
}
}
}
item: "kubejs:enchanted_screwdriver"
type: "item"
}]
subtitle: "{cabin.quest.4F953BACF4D1C151.subtitle}"
Expand Down Expand Up @@ -210,22 +178,7 @@
id: "43FC566E833BE834"
rewards: [{
id: "0F4C7BB4C0ECB4CC"
item: {
Count: 1
id: "kubejs:chromatic_resonator"
tag: {
Damage: 0
Enchantments: [{
id: "minecraft:unbreaking"
lvl: 10s
}]
HideFlags: 1
Unbreakable: 1
display: {
Name: "{\"text\":\"Enchanted Resonator\",\"color\":\"gold\",\"italic\":false}"
}
}
}
item: "kubejs:enchanted_chromatic_resonator"
type: "item"
}]
subtitle: "{cabin.quest.00D6DD6AE8E3C014.subtitle}"
Expand Down Expand Up @@ -667,22 +620,7 @@
id: "00D6DD6AE8E3C014"
rewards: [{
id: "3EA7518063CBEA5B"
item: {
Count: 1
id: "kubejs:flash_drive"
tag: {
Damage: 0
Enchantments: [{
id: "minecraft:unbreaking"
lvl: 10s
}]
HideFlags: 1
Unbreakable: 1
display: {
Name: "{\"text\":\"Enchanted Flash Drive\",\"color\":\"gold\",\"italic\":false}"
}
}
}
item: "kubejs:enchanted_flash_drive"
type: "item"
}]
subtitle: "{cabin.quest.00D6DD6AE8E3C014.subtitle}"
Expand Down
12 changes: 12 additions & 0 deletions kubejs/server_scripts/recipes/unbreakable_fix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ServerEvents.recipes(event => {
// Generates new recipes for the mechanisms that does not consume the tool in the deploying process if they are the "Enchanted" (unbreakable) ones
function unbreakableRecipe(toolid, mechanismid) {
event.recipes.create
.deploying(mechanismid, [Item.of(mechanismid.replace(":", ":incomplete_"), "{SequencedAssembly:{Progress:0.6666667f,Step:2}}").weakNBT(), toolid])
.keepHeldItem();
}
unbreakableRecipe("kubejs:enchanted_saw", "kubejs:kinetic_mechanism");
unbreakableRecipe("kubejs:enchanted_screwdriver", "create:precision_mechanism");
unbreakableRecipe("kubejs:enchanted_chromatic_resonator", "kubejs:inductive_mechanism");
unbreakableRecipe("kubejs:enchanted_flash_drive", "kubejs:calculation_mechanism");
});
17 changes: 17 additions & 0 deletions kubejs/startup_scripts/unbreakables.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
StartupEvents.registry("item", event => {
// Creates a duplicate tool with a given texture to be used as non-consumable ingredient in auxiliary deployer recipes
function createEnchanted(tool, texture) {
event
.create("enchanted_" + tool.toLowerCase().replace(" ", "_"))
.unstackable()
.glow(true)
.displayName("Enchanted " + tool)
.rarity("uncommon")
.texture(texture)
.tooltip(Text.darkPurple("To be used ONLY with deployers"));
}
createEnchanted("Saw", "cb_microblock:item/diamond_saw");
createEnchanted("Screwdriver", "projectred_core:item/screwdriver");
createEnchanted("Chromatic Resonator", "cabin:item/chromatic_resonator");
createEnchanted("Flash Drive", "cabin:item/boot_medium");
});