Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GT materials for dense ore decomposition. #1471

Merged
merged 1 commit into from
Feb 6, 2025
Merged
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
43 changes: 14 additions & 29 deletions kubejs/server_scripts/gregtech/dense_ores.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@
*/

const ores = [
{name: 'redstone', mod: 'gtceu'},
{name: 'diamond', mod: 'gtceu'},
{name: 'emerald', mod: 'gtceu'},
{name: 'lapis', mod: 'gtceu'},
{name: 'coal', mod: 'gtceu'},
{name: 'nether_quartz', mod: 'gtceu'},
{name: 'iron', mod: 'minecraft'},
{name: 'gold', mod: 'minecraft'},
{name: 'copper', mod: 'minecraft'},
['redstone', 16],
['diamond', 16],
['emerald', 16],
['gold', 16],
['lapis', 16],
['iron', 16],
['coal', 16],
['nether_quartz', 32],
['copper', 16],
]

ServerEvents.recipes(event => {
ores.forEach(ore => {
event.recipes.gtceu.chemical_reactor(`kubejs:undensify_${ore.name}`)
.itemInputs(`kubejs:dense_${ore.name}_ore`)
.itemOutputs(`16x ${ore.mod}:raw_${ore.name}`)
ores.forEach(([name, amount]) => {
event.recipes.gtceu.chemical_reactor(`kubejs:undensify_${name}`)
.itemInputs(`kubejs:dense_${name}_ore`)
.itemOutputs(ChemicalHelper.get("raw", name, amount))
.inputFluids(Fluid.of("gtceu:nitric_acid", 1000))
.duration(200)
.EUt(500)
})

event.recipes.gtceu.chemical_reactor("kubejs:undensify_oilsands")
.itemInputs("kubejs:dense_oilsands_ore")
.itemOutputs('16x gtceu:raw_oilsands')
.itemOutputs('16x gtceu:endstone_oilsands_ore')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had left this untouched when I was doing the change, to allow the use of the centrifuging recipe for oilsand blocks. It allows using the miner trick for it, but oil is cheap enough that I don't think it maters.

.inputFluids(Fluid.of("gtceu:nitric_acid", 1000))
.duration(200)
.EUt(500)
Expand All @@ -38,18 +38,3 @@ ServerEvents.recipes(event => {
.duration(200)
.EUt(500)
})

ServerEvents.tags('item', event => {
// dense ore mod is gone, so we tag it
ores.forEach(ore => {
event.add("forge:ores/dense", `forge:ores/dense/${ore.name}`, `kubejs:dense_${ore.name}`);
// event.add('forge:dense_ores', `kubejs:dense_${ore}`);
})
})

ServerEvents.tags('block', event => {
// might as well
ores.forEach(ore => {
event.add("forge:ores/dense", `forge:ores/dense/${ore.name}`, `kubejs:dense_${ore.name}`);
})
})
30 changes: 15 additions & 15 deletions kubejs/startup_scripts/registry/block_registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,26 +148,26 @@ StartupEvents.registry("block", event => {

// Dense Ores
const ores = [
'redstone_ore',
'diamond_ore',
'emerald_ore',
'gold_ore',
'lapis_ore',
'iron_ore',
'coal_ore',
'copper_ore',
'nether_quartz_ore',
'oilsands_ore'
'redstone',
'diamond',
'emerald',
'gold',
'lapis',
'iron',
'coal',
'copper',
'nether_quartz',
'oilsands'
]

ores.forEach(ore => {
event.create(`dense_${ore}`)
event.create(`dense_${ore}_ore`)
.soundType('stone')
.resistance(6)
.hardness(5)
.tagBlock('mineable/pickaxe')
.tagBlock('forge:ores/dense')
.tagBlock(`forge:ores/dense_${ore}`)
.tagBoth('forge:ores/dense')
.tagBoth(`forge:ores/dense/${ore}`)
.requiresTool(true);
});

Expand All @@ -176,8 +176,8 @@ StartupEvents.registry("block", event => {
.resistance(6)
.hardness(5)
.tagBlock('mineable/pickaxe')
.tagBlock('forge:ores/dense')
.tagBlock('forge:ores/dense_magma')
.tagBoth('forge:ores/dense')
.tagBoth('forge:ores/dense/magma')
.requiresTool(true)
.lightLevel(1.0);

Expand Down