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

Diesel Generators Compat #129

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
// Create Diesel Generators
if(Platform.isLoaded("createdieselgenerators")) {
onEvent('fluid.tags', event => {

// Pumpjack Output
event.remove('createdieselgenerators:pumpjack_output', 'createdieselgenerators:crude_oil')
event.add('createdieselgenerators:pumpjack_output', 'thermal:crude_oil')
})

onEvent('recipes', event => {

// Duplicated Oils
event.remove({id: 'createdieselgenerators:mixing/biodiesel'})
event.remove({id: 'createdieselgenerators:compacting/plant_oil'})
event.remove({id: 'createdieselgenerators:distillation/crude_oil'}) // Distillation outputs can't be changed with scripts

// Crude Distilation
event.custom({
"type": "createdieselgenerators:distillation",
"ingredients": [
{"fluid": "thermal:crude_oil", "amount": 200}
],
"heatRequirement": "heated",
"processingTime": 200,
"results": [
{"fluid": "thermal:heavy_oil", "amount": 80},
{"fluid": "thermal:light_oil", "amount": 120},
]
})

// Crude Extraction
copperMachine(event, Item.of('createdieselgenerators:pumpjack_hole', 1))
invarMachine(event, Item.of('createdieselgenerators:pumpjack_crank', 1), 'create:zinc_block')
invarMachine(event, Item.of('createdieselgenerators:oil_scanner', 1), 'ae2:charged_certus_quartz_crystal')
event.replaceInput({
id: 'createdieselgenerators:crafting/pumpjack_bearing'},
'create:andesite_alloy',
'thermal:invar_ingot')
event.replaceInput({
id: 'createdieselgenerators:crafting/pumpjack_head'},
'create:zinc_ingot',
'thermal:invar_ingot')

// Oil Engines
event.remove({id: 'createdieselgenerators:crafting/engine_piston'}) // This one uses a Shaft instead of an Iron Rod
event.remove({id: 'createdieselgenerators:crafting/diesel_engine'})
event.recipes.create.mechanical_crafting('createdieselgenerators:diesel_engine', [
' BLB ',
'PPSPP',
' BTB '],{
L: 'createdieselgenerators:lighter',
P: 'createdieselgenerators:engine_piston',
B: 'create:brass_ingot',
S: 'create:shaft',
T: 'create:fluid_tank',
})
zincMachine(event, Item.of('createdieselgenerators:large_diesel_engine', 1), 'createdieselgenerators:diesel_engine')
invarMachine(event, Item.of('createdieselgenerators:huge_diesel_engine', 1), 'create:brass_block')

// Wooden Chips Patch
event.remove({id: 'createdieselgenerators:crafting/chip_wood_block'}),
event.shaped('createdieselgenerators:chip_wood_block', [
'CCC',
'CCC',
'CCC'],{
C: 'createdieselgenerators:wood_chip' // Now uses 9 instead of 4 in order to prevent duping exploits
})

// Asphalt from Bucket
event.replaceInput({
id: 'createdieselgenerators:crafting/asphalt_block'},
'createdieselgenerators:crude_oil_bucket',
'thermal:crude_oil_bucket')
})

onEvent('server.datapack.first', event => {

// Thermal's Fuels
// There's gotta be a way to compact all these in a single function, but I couldn't figure it out
event.addJson(`createdieselgenerators:diesel_engine_fuel_types/creosote`, {
"fluid": "thermal:creosote",
"sound_speed": 3,
"normal": {"speed": 64.0, "strength": 2048.0, "burn_rate": 2},
"modular": { "speed": 32.0, "strength": 3072.0, "burn_rate": 6},
"huge": {"speed": 32.0, "strength": 4096.0, "burn_rate": 8}
})
event.addJson(`createdieselgenerators:diesel_engine_fuel_types/heavy_oil`, {
"fluid": "thermal:heavy_oil",
"sound_speed": 3,
"normal": {"speed": 64.0, "strength": 2048.0, "burn_rate": 2},
"modular": { "speed": 96.0, "strength": 6144.0, "burn_rate": 3},
"huge": {"speed": 128.0, "strength": 12288.0, "burn_rate": 4}
})
event.addJson(`createdieselgenerators:diesel_engine_fuel_types/light_oil`, {
"fluid": "thermal:light_oil",
"sound_speed": 3,
"normal": {"speed": 64.0, "strength": 3072.0, "burn_rate": 2},
"modular": { "speed": 128.0, "strength": 6144.0, "burn_rate": 3},
"huge": {"speed": 96.0, "strength": 6144.0, "burn_rate": 6}
})
event.addJson(`createdieselgenerators:diesel_engine_fuel_types/refined_fuel`, {
"fluid": "#thermal:refined_fuel",
"sound_speed": 3,
"normal": {"speed": 64.0, "strength": 4096.0, "burn_rate": 1},
"modular": { "speed": 128.0, "strength": 8192.0, "burn_rate": 2},
"huge": {"speed": 128.0, "strength": 16384.0, "burn_rate": 4}
})
event.addJson(`createdieselgenerators:diesel_engine_fuel_types/tree_oil`, {
"fluid": "thermal:tree_oil",
"sound_speed": 1,
"normal": {"speed": 32.0, "strength": 1024.0, "burn_rate": 1},
"modular": { "speed": 64.0, "strength": 2048.0, "burn_rate": 2},
"huge": {"speed": 64.0, "strength": 3072.0, "burn_rate": 6}
})

// Forge's Fuel Tags
event.addJson(`createdieselgenerators:diesel_engine_fuel_types/biodiesel`, {
"fluid": "#forge:biofuel",
"sound_speed": 3,
"normal": {"speed": 64.0, "strength": 4096.0, "burn_rate": 3},
"modular": { "speed": 128.0, "strength": 8192.0, "burn_rate": 6},
"huge": {"speed": 128.0, "strength": 12288.0, "burn_rate": 12}
})
event.addJson(`createdieselgenerators:diesel_engine_fuel_types/diesel`, {
"fluid": "#forge:diesel",
"sound_speed": 3,
"normal": {"speed": 64.0, "strength": 2048.0, "burn_rate": 2},
"modular": { "speed": 96.0, "strength": 6144.0, "burn_rate": 3},
"huge": {"speed": 128.0, "strength": 12288.0, "burn_rate": 4}
})
event.addJson(`createdieselgenerators:diesel_engine_fuel_types/ethanol`, {
"fluid": "#forge:ethanol",
"sound_speed": 2,
"normal": {"speed": 64.0, "strength": 3072.0, "burn_rate": 3},
"modular": { "speed": 96.0, "strength": 6144.0, "burn_rate": 6},
"huge": {"speed": 96.0, "strength": 6144.0, "burn_rate": 12}
})
event.addJson(`createdieselgenerators:diesel_engine_fuel_types/gasoline`, {
"fluid": "#forge:gasoline",
"sound_speed": 3,
"normal": {"speed": 64.0, "strength": 3072.0, "burn_rate": 2},
"modular": { "speed": 128.0, "strength": 6144.0, "burn_rate": 3},
"huge": {"speed": 96.0, "strength": 6144.0, "burn_rate": 6}
})
event.addJson(`createdieselgenerators:diesel_engine_fuel_types/plantoil`, {
"fluid": "#forge:plantoil",
"sound_speed": 1,
"normal": {"speed": 32.0, "strength": 1024.0, "burn_rate": 1},
"modular": { "speed": 64.0, "strength": 2048.0, "burn_rate": 2},
"huge": {"speed": 64.0, "strength": 3072.0, "burn_rate": 6}
})

// Disable Beyond Earth's oil wells
event.addJson(`beyond_earth:tags/worldgen/biome/has_structure/oil_well_biomes`, {
"replace": true, "values": []
})
})
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Create Diesel Generators
if (Platform.isLoaded("createdieselgenerators")) {
global.itemBlacklist.push("createdieselgenerators:crude_oil_bucket")
global.itemBlacklist.push("createdieselgenerators:gasoline_bucket")
global.itemBlacklist.push("createdieselgenerators:diesel_bucket")
global.itemBlacklist.push("createdieselgenerators:biodiesel_bucket")
global.itemBlacklist.push("createdieselgenerators:plant_oil_bucket")
global.itemBlacklist.push("beyond_earth:oil_bucket")

global.jeiFluidBlacklist.push('createdieselgenerators:crude_oil')
global.jeiFluidBlacklist.push('createdieselgenerators:flowing_crude_oil')
global.jeiFluidBlacklist.push('createdieselgenerators:gasoline')
global.jeiFluidBlacklist.push('createdieselgenerators:flowing_gasoline')
global.jeiFluidBlacklist.push('createdieselgenerators:diesel')
global.jeiFluidBlacklist.push('createdieselgenerators:flowing_diesel')
global.jeiFluidBlacklist.push('createdieselgenerators:biodiesel')
global.jeiFluidBlacklist.push('createdieselgenerators:flowing_biodiesel')
global.jeiFluidBlacklist.push('createdieselgenerators:plant_oil')
global.jeiFluidBlacklist.push('createdieselgenerators:flowing_plant_oil')
global.jeiFluidBlacklist.push('beyond_earth:oil')

global.randomiumBlacklist.push("createdieselgenerators:pumpjack_crank")
global.randomiumBlacklist.push("createdieselgenerators:pumpjack_head")
global.randomiumBlacklist.push("createdieselgenerators:pumpjack_bearing")
global.randomiumBlacklist.push("createdieselgenerators:huge_diesel_engine")
global.randomiumBlacklist.push("createdieselgenerators:oil_scanner")
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"item.beyond_earth.rocket_t1": "The Rocket",
"item.beyond_earth.rocket_t1": "The Rocket",
"biome.beyond_earth.moon_desert": "The Moon",
"item.beyond_earth.fuel_bucket": "Rocket Fuel Bucket",
"fluid.beyond_earth.fuel": "Rocket Fuel"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"item.createaddition.seed_oil_bucket": "Seed Oil Bucket",
"item.createaddition.bioethanol_bucket": "Bioethanol Bucket"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"block.createdieselgenerators.diesel_engine": "Compact Oil Engine",
"block.createdieselgenerators.large_diesel_engine": "Modular Oil Engine",
"block.createdieselgenerators.huge_diesel_engine": "Huge Oil Engine",
"item.createdieselgenerators.chemical_sprayer_lighter": "Ignition Chemical Sprayer"
}
18 changes: 15 additions & 3 deletions overrides/resourcepacks/CABIN/assets/thermal/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
"item.thermal.raw_lead": "Concentrated Raw Lead",
"item.thermal.raw_nickel": "Concentrated Raw Nickel",
"item.thermal.raw_silver": "Concentrated Raw Silver"


}
"item.thermal.lead_plate": "Lead Sheet",
"item.thermal.nickel_plate": "Nickel Sheet",
"item.thermal.silver_plate": "Silver Sheet",
"item.thermal.constantan_plate": "Constantan Sheet",
"item.thermal.electrum_plate": "Electrum Sheet",
"item.thermal.invar_plate": "Invar Sheet",
"item.thermal.enderium_plate": "Enderium Sheet",
"item.thermal.lumium_plate": "Lumium Sheet",
"item.thermal.signalum_plate": "Signalum Sheet"
"item.thermal.heavy_oil_bucket": "Diesel Bucket",
"item.thermal.light_oil_bucket": "Gasoline Bucket",
"fluid.thermal.creosote": "Creosote",
"fluid.thermal.heavy_oil": "Diesel",
"fluid.thermal.light_oil": "Gasoline"
}