Skip to content

Commit

Permalink
crafting tweaks
Browse files Browse the repository at this point in the history
fixes #2, #3, #4, #5
  • Loading branch information
Octelly committed Nov 17, 2023
1 parent 4621717 commit c5e2bab
Show file tree
Hide file tree
Showing 12 changed files with 384 additions and 11 deletions.
41 changes: 39 additions & 2 deletions index.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,22 @@ metafile = true
file = "config/wands.json"
hash = "03fe0fe10c89a9d24e877fe0c3c8be1eae51b3a6180033fbaf9d9953dbdbf92a"

[[files]]
file = "kubejs/assets/kubejs/textures/item/wet_sawdust.png"
hash = "e30f23e1a125565bfbd931c050bf5262e205ef61ef58d026f4fe832b40b468d7"

[[files]]
file = "kubejs/config/client.properties"
hash = "e88bc5877d8680de1389849d4ce2d0387b281d48c625379ba729e31fd6587993"

[[files]]
file = "kubejs/server_scripts/recipes.js"
hash = "28502cc74a7dacf4b9b534efc33acd959e20d72431cbef6e5f4260034b7ecd59"

[[files]]
file = "kubejs/startup_scripts/items_blocks.js"
hash = "9f4c40245e367f60030f3f28f22409ac18be0f774bdd195d39c583bcbbf7703e"

[[files]]
file = "mods/abnormals-delight.pw.toml"
hash = "96e224d20455cc3a6a812c343b3cb2ddc3c19ee7565a14c1ab6fd2ae9502c879"
Expand Down Expand Up @@ -94,6 +106,11 @@ file = "mods/applied-mekanistics.pw.toml"
hash = "9481e28c61c24ea4e928181f575334622a4b19abbbb211467d1cb3a8dedb25e7"
metafile = true

[[files]]
file = "mods/architects-palette.pw.toml"
hash = "fa907377a77cfabd9b70b6e61bdcdd19d124bd86d7d3fb234c884ae03cd72683"
metafile = true

[[files]]
file = "mods/architectury-api.pw.toml"
hash = "4864451af376b26104b421900f69a0bea7c462edc2e47e359a341dbc457f3508"
Expand Down Expand Up @@ -281,7 +298,7 @@ metafile = true

[[files]]
file = "mods/create-dreams-and-desires.pw.toml"
hash = "c82c4a0930007991f93014698ec16c8d527d284cb11e465290a5e4c8eff5b5c5"
hash = "c147510a6546352f6b6a3f8b00f05d35e1461e4692b782017efdccd0cd497e2a"
metafile = true

[[files]]
Expand Down Expand Up @@ -541,7 +558,7 @@ metafile = true

[[files]]
file = "mods/interiors.pw.toml"
hash = "a13b245beac299b155b1a3faa06fefa0d7d29c12c16fa102243ec3cb8e516883"
hash = "e6f7821217f3856311ec2f59eaa2effff6273483854d6a2293cb62ca6f104f46"
metafile = true

[[files]]
Expand Down Expand Up @@ -594,6 +611,26 @@ file = "mods/konkrete.pw.toml"
hash = "fa0ac28adaba1a26ee447f2fda6ab0211c3e980352a9d6d9b9ace9d7225a17bf"
metafile = true

[[files]]
file = "mods/kubejs-create.pw.toml"
hash = "6ba38b772ff6217503bbba600deef53ae2b57b481fc7bcb304642e24e0f79136"
metafile = true

[[files]]
file = "mods/kubejs-immersive-engineering.pw.toml"
hash = "9d6778c83a53f59596ff991629915cd288c12a8d027757494207525dcbab42b2"
metafile = true

[[files]]
file = "mods/kubejs-mekanism.pw.toml"
hash = "3be10aca1353ea4c9a6a76380ef56ff96982d8542f7db9dbf91288ea83359785"
metafile = true

[[files]]
file = "mods/kubejs-thermal.pw.toml"
hash = "9451b4e570967d07f358f651ba77e6dea088681467068d1687e01dd3e2afa28c"
metafile = true

[[files]]
file = "mods/kubejs.pw.toml"
hash = "0e82bb571251b2274b6fa354d7416e46a52936fae1a36a13558fa3c555bcd266"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
250 changes: 250 additions & 0 deletions kubejs/server_scripts/recipes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
// priority: 0

// Based on Create: Above and Beyond scripts

// Mod shortcuts
let MOD = (domain, id, x) => (x ? `${x}x ` : "") + (id.startsWith('#') ? '#' : "") + domain + ":" + id.replace('#', '')
let F = (id, x) => MOD("forge", id, x)
let MC = (id, x) => MOD("minecraft", id, x)
let KJ = (id, x) => MOD("kubejs", id, x)
let CR = (id, x) => MOD("create", id, x)
let CRTAM = (id, x) => MOD("create_things_and_misc", id, x)
let MEK = (id, x) => MOD("mekanism", id, x)
let AP = (id, x) => MOD("architects_palette", id, x)
let ENV = (id, x) => MOD("environmental", id, x)
let AQU = (id, x) => MOD("upgrade_aquatic", id, x)
let TIC = (id, x) => MOD("tconstruct", id, x)
let ATM = (id, x) => MOD("atmospheric", id, x)
let AUT = (id, x) => MOD("autumnity", id, x)
let QRK = (id, x) => MOD("quark", id, x)
let IE = (id, x) => MOD("immersiveengineering", id, x)
let TH = (id, x) => MOD("thermal", id, x)



let planks
onEvent('item.tags', event => {
planks = event.get('minecraft:planks').getObjectIds()
})

//let slimeList
//onEvent('fluid.tags', event => {
// slimeList = event.get(TIC('slime')).getObjectIds()
//})
//console.log("Slime list:")
//console.log(slimeList)


onEvent('item.tags', event => {
event.remove(F("rods/wooden"), IE("stick_treated"))
event.remove("balm:wooden_rods", IE("stick_treated"))

event.add(KJ('basic_furnace'), MC('furnace'))
event.add(KJ('basic_furnace'), QRK('deepslate_furnace'))
event.add(KJ('basic_furnace'), QRK('blackstone_furnace'))
})

onEvent('recipes', event => {
//immersiveNerf(event)
betterSawdust(event)
rubberAndPlastic(event)
milk(event)
slimeFix(event)
andesiteMachine(event)
misc(event)
})

onEvent('item.modification', event => {
event.modify('create_dd:coal_piece', item => {
item.burnTime = 200
})
})

function immersiveNerf(event) {
event.remove({ id: /immersiveengineering:crafting\/plate_.*_hammering/ })
event.remove({ id: /immersiveengineering:crafting\/.*hammercrushing.*/ })
}

function betterSawdust(event) {
//event.remove({ output: F('#sawdust') })

planks.forEach(log => {
event.recipes.createCrushing([
IE('dust_wood'),
Item.of(log).withChance(0.5)
], log)
})

event.remove({ input: F('#sawdust'), output: F('#paper') })
event.shapeless(MC('paper'), IE('dust_wood', 3))
event.recipes.createSequencedAssembly([
MC('paper')
], IE('dust_wood'), [
event.recipes.createFilling(KJ('wet_sawdust'), [
KJ('wet_sawdust'),
Fluid.of('water', 125)
]),
event.recipes.createPressing(KJ('wet_sawdust'), KJ('wet_sawdust'))
]).transitionalItem(KJ('wet_sawdust')).loops(1)
}

function rubberAndPlastic(event) {
//event.replaceInput({}, 'industrialforegoing:plastic', 'pneumaticcraft:plastic')
//event.remove({ output: 'industrialforegoing:plastic' })
//event.remove({ output: 'pneumaticcraft:plastic' })

//event.remove({ type: 'industrialforegoing:fluid_extractor' })

//for (const [type, blocks] of Object.entries(global.wood_types)) {
// if ("log" in blocks &&
// "stripped_log" in blocks) {
// event.custom({
// type: 'industrialforegoing:fluid_extractor',
// input: Item.of(blocks.log).toJson(),
// result: blocks.stripped_log,
// breakChange: 0.010,
// output: "{FluidName:\"industrialforegoing:latex\",Amount:33}",
// defaultRecipe: false
// })
// }

//}

//event.recipes.createCompacting('industrialforegoing:tinydryrubber', Fluid.of('industrialforegoing:latex', 200))

//event.smelting(KJ('cured_rubber'), 'industrialforegoing:dryrubber')
//event.recipes.createPressing('pneumaticcraft:plastic', KJ('cured_rubber'))

let rubber = 'create_dd:rubber'

event.remove({ mod: 'create', output: CR('belt_connector') })

event.replaceInput({ mod: 'create' }, MC('dried_kelp'), rubber)
event.replaceInput({ mod: 'create_enchantment_industry' }, MC('dried_kelp'), rubber)
event.replaceInput({ mod: 'create_things_and_misc' }, MC('dried_kelp'), rubber)
event.replaceInput({ mod: 'interiors' }, MC('dried_kelp'), rubber)
event.replaceInput({ mod: 'createdieselgenerators' }, MC('dried_kelp'), rubber)
event.replaceInput({ mod: 'create_dd' }, MC('dried_kelp'), rubber)

event.replaceInput({}, TH('rubber'), 'create_dd:raw_rubber')
event.replaceInput({}, TH('cured_rubber'), 'create_dd:rubber')
event.replaceOutput({}, TH('rubber'), 'create_dd:raw_rubber')
event.replaceOutput({}, TH('cured_rubber'), 'create_dd:rubber')

//event.remove({ id: /create_dd:sap_from_.*_log/ })
//event.remove({ id: /create_dd:sap_from_.*_wood/ })

//event.remove({ output: 'industrialforegoing:straw' })
//event.remove({ id: 'createaddition:rolling/straw' })
//event.custom({
// type: 'createaddition:rolling',
// input: Item.of('pneumaticcraft:plastic').toJson(),
// result: Item.of('createaddition:straw', 3).toResultJson()
//})
}

function milk(event) {
event.replaceInput({}, 'neapolitan:milk_bottle', 'farmersdelight:milk_bottle')
event.remove({ output: 'neapolitan:milk_bottle' })

event.shapeless('4x farmersdelight:milk_bottle', [
MC('glass_bottle', 4),
MC('milk_bucket')
]).replaceIngredient({ item: Item.of(MC('milk_bucket')) }, MC('bucket'))

event.remove({ id: 'neapolitan:milk/milk_bottles_from_bucket' })
event.shapeless(MC('milk_bucket'), [
'4x farmersdelight:milk_bottle',
MC('bucket')
]).replaceIngredient({ item: Item.of('farmersdelight:milk_bottle') }, MC('glass_bottle'))
}

function slimeFix(event) {
event.remove({ id: 'create_things_and_misc:slimefluidcraft' })
event.remove({ id: 'create_things_and_misc:slime_emptying' })
event.remove({ id: 'create_things_and_misc:slime_gun_craft' })
event.remove({ id: 'create_things_and_misc:slime_fluid_craft' })
event.remove({ id: 'create_things_and_misc:glue_fluid_craft' })
event.remove({ id: 'create_things_and_misc:porridgecraft' })

//for (slime in slimeList) {
// event.recipes.createFilling(CRTAM('spout_gun_slime'), [CRTAM('spout_gun'), Fluid.of(slime, 1000)])
// event.recipes.createFilling(CR('super_glue'), [CRTAM('glue_packaging'), Fluid.of(slime, 100)])
// event.recipes.createFilling(CRTAM('slime_cake'), [CR('blaze_cake_base'), Fluid.of(slime, 250)])
//}

let slime = TIC('earth_slime')
event.recipes.createFilling(CRTAM('spout_gun_slime'), [CRTAM('spout_gun'), Fluid.of(slime, 1000)])
event.recipes.createFilling(CR('super_glue'), [CRTAM('glue_packaging'), Fluid.of(slime, 100)])
event.recipes.createFilling(CRTAM('slime_cake'), [CR('blaze_cake_base'), Fluid.of(slime, 250)])
}

function andesiteMachine(event) {

//let transitional = KJ('incomplete_kinetic_mechanism')
//event.recipes.createSequencedAssembly([
// KJ('kinetic_mechanism'),
//], MC('#wooden_slabs'), [
// event.recipes.createDeploying(transitional, [transitional, CR('andesite_alloy')]),
// event.recipes.createDeploying(transitional, [transitional, CR('andesite_alloy')]),
// event.recipes.createCutting(transitional, transitional),
//]).transitionalItem(transitional).loops(1)

//event.shapeless(KJ('kinetic_mechanism'),
// [MC('#logs'), CR('andesite_alloy'), CR('andesite_alloy'), CR('cogwheel')]).id(KJ('kinetic_mechanism_manual_only'))

//event.remove({ output: 'industrialforegoing:fluid_extractor' })
//event.shapeless("industrialforegoing:fluid_extractor",
// [KJ('kinetic_mechanism'), CR('andesite_casing'), MC('bucket')])

// let's add a reason to start with Immersive Engineering
event.remove({ mod: 'create', output: CR('white_sail') })
event.replaceInput({ output: CR('white_sail') }, F("#rods/wooden"), IE("stick_treated"))

event.remove({ id: IE("crafting/blastbrick") })
event.shaped(IE("blastbrick", 3), [
'BIB',
'ICI',
'BIB'
], {
B: F("#ingots/brick"),
I: F("#ingots/iron"),
C: F("#coal_coke"),
})

event.remove({ id: IE("crafting/blastbrick_reinforced") })
event.recipes.createDeploying(IE("blastbrick_reinforced"), [IE("blastbrick"), F("#plates/steel")])

event.remove({ output: CR("mechanical_saw") })
event.shaped(CR("mechanical_saw"), [
'S',
'C'
], {
S: F("#sawblades"),
C: CR("andesite_casing")
})

//event.replaceInput({ output: CR("brass_hand") }, F("#plates/brass"), F("#plates/gold"))
//event.remove({ output: CR("deployer") })
//event.shaped(CR("deployer"), [
// 'S',
// 'C',
// "B"
//], {
// S: CR("shaft"),
// C: CR("andesite_casing"),
// B: CR("brass_hand")
//})
}

function misc(event) {
event.replaceInput({ output: 'create_enchantment_industry:disenchanter' }, CR('#sandpaper'), "farmersdelight:canvas")
event.replaceInput({}, MC('furnace'), KJ('basic_furnace'))

event.shaped(MC('stick', 16), [
'L',
'L'
], {
L: MC('#logs')
})
}
21 changes: 21 additions & 0 deletions kubejs/startup_scripts/items_blocks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// priority: 0

let MOD = (domain, id, x) => (x ? `${x}x ` : "") + (id.startsWith('#') ? '#' : "") + domain + ":" + id.replace('#', '')
let MC = (id, x) => MOD("minecraft", id, x)

onEvent('item.registry', event => {
//let mechanism = (name) => {
// let id = name.toLowerCase()
// event.create(id + '_mechanism').texture("kubejs:item/" + id + "_mechanism").displayName(name + ' Mechanism')
// event.create('incomplete_' + id + '_mechanism', 'create:sequenced_assembly').texture("kubejs:item/incomplete_" + id + "_mechanism").displayName('Incomplete ' + name + ' Mechanism')
//}

//mechanism('Kinetic')

event.create('wet_sawdust', 'create:sequenced_assembly').displayName('Wet Sawdust').texture("kubejs:item/wet_sawdust")


//event.create('zinc_sheet').displayName('Zinc Sheet').texture("createaddition:item/zinc_sheet")

//event.create('cured_rubber').displayName('Cured Rubber').texture("kubejs:item/cured_rubber")
})
13 changes: 13 additions & 0 deletions mods/architects-palette.pw.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name = "Architect's Palette"
filename = "Architects-Palette-1.18.2-1.3.2.jar"
side = "both"

[download]
url = "https://cdn.modrinth.com/data/vt0VyseM/versions/tvsKDKm6/Architects-Palette-1.18.2-1.3.2.jar"
hash-format = "sha1"
hash = "268567cb05024db60424a7d717a57d9baccd7f6f"

[update]
[update.modrinth]
mod-id = "vt0VyseM"
version = "tvsKDKm6"
8 changes: 4 additions & 4 deletions mods/create-dreams-and-desires.pw.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name = "Create: Dreams & Desires"
filename = "Create-Dreams-n-Desires-1.18.2-0.1a.PREBETA.jar"
filename = "Create-Dreams-n-Desires-1.18.2-0.2b.PREBETA.jar"
side = "both"

[download]
url = "https://cdn.modrinth.com/data/JmybsfWs/versions/UOuN7K92/Create-Dreams-n-Desires-1.18.2-0.1a.PREBETA.jar"
url = "https://cdn.modrinth.com/data/JmybsfWs/versions/CZ1Zp3mk/Create-Dreams-n-Desires-1.18.2-0.2b.PREBETA.jar"
hash-format = "sha1"
hash = "ac35b16fd50458ef06267ec4a7148e616abc26ab"
hash = "b43d92a623641da751056b59cbf80204503aac88"

[update]
[update.modrinth]
mod-id = "JmybsfWs"
version = "UOuN7K92"
version = "CZ1Zp3mk"
Loading

0 comments on commit c5e2bab

Please sign in to comment.