Skip to content

Commit

Permalink
Emergency: Fixing Normal Mode (+ Subatomic Digital Assembler) (#167)
Browse files Browse the repository at this point in the history
* Added Infinity Frame

* Omnic Forge and Conencted Textures

Careful: This commit crashes on startup without GTm 1.2.1

* Nethline, Connected Textures and Minimum Casing Amounts

- Completed Netherite Processing Line (Nethline).
- Made custom casings and multiblocks have proper connected textures.
- Added a minimum casing amount to all custom multiblocks, while still leaving some wiggle room for modularity.
- Merged Atomic Reconstructor and Resonator.

* Updated ExtCrafting Moni Edition

* Lang and recipe fixes

* Putting "Nether" in "Inert Nether Compound Ingot"

* Internal renaming of Creative Tank Fabricator

* Subatomic Digital Assembler

C2M (Computer Work Unit to Mass) conversion has been achieved.

Well no it hasn't yet but I'm getting there.

* Fixed Normal Mode.

- Apparently, the game REALLY DOES NOT LIKE when you define a function inside an if statement (looking at you Pansmith)
- So I just moved the problematic definitions before the if statements, and also deleted a duplicate recipe.

* Fixed a tiny mistake and added CWU recipe element.
  • Loading branch information
WithersChat authored May 9, 2024
1 parent 881ec59 commit a350674
Show file tree
Hide file tree
Showing 12 changed files with 81 additions and 79 deletions.
1 change: 1 addition & 0 deletions config/jade/plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
"epic_table": true,
"elite_table": true,
"basic_table": true,
"epic_auto_table": true,
"crafting_core": true,
"advanced_auto_table": true,
"compressor": true
Expand Down
9 changes: 6 additions & 3 deletions kubejs/assets/gtceu/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
"gtceu.naquadah_reactor_ii": "Naquadah Reactor II",
"block.gtceu.mv_atomic_reconstructor": "Atomic Reconstructor",
"gtceu.atomic_reconstruction": "Atomic Reconstruction",
"block.gtceu.omnic_forge": "Omnic Forge",
"gtceu.omnic_forge": "Omnic Forge",
"gtceu.large_material_press": "Large Material Press",
"tagprefix.perfect": "Perfect %s",
"material.gtceu.dilithium": "Dilithium",
"material.gtceu.restonia": "§cRestonia Crystal",
Expand Down Expand Up @@ -61,8 +64,8 @@
"block.gtceu.draconic_reactor": "Draconic Reactor",
"block.gtceu.draconic_fusion_reactor": "Draconic Fusion Reactor",
"gtceu.draconic_reactor": "Draconic Fusion Reaction",
"block.gtceu.creative_tank_fabricator": "Creative Tank Fabricator",
"gtceu.creative_tank_fabricator": "Creative Tank Fabrication",
"block.gtceu.subatomic_digital_assembler": "Subatomic Digital Assembler",
"gtceu.subatomic_digital_assembler": "Subatomic Digital Assembler",
"block.gtceu.creative_energy": "Infinite GT Energy Unit Emitter",
"block.gtceu.creative_chest": "Creative Quantum Chest",
"block.gtceu.creative_tank": "Creative Quantum Tank",
Expand All @@ -81,9 +84,9 @@
"gtceu.advanced_microverse_projector_ii.desc": "An elite machine capable of stabilizing projection into microverses for exotic missions, including collapsing the microverse whole.",
"gtceu.advanced_microverse_projector_iii.desc": "An epic machine capable of stabilizing projection into hundreds of microverses at once.",
"gtceu.advanced_microverse_projector_iii_2.desc": "Can perform all Microverse Missions.",
"gtceu.creative_tank_fabricator.desc": "A complex machine capable of turning buckets and molds into infinite reservoirs beyond human comprehension",
"block.gtceu.advanced_assline":"Advanced Assembly Line",
"gtceu.advanced_assline.desc":"Uses microverses to process hundreds of assembly line recipes at once.",
"gtceu.subatomic_digital_assembler.desc": "§8A complex machine capable of synthetizing certain technological marvels when provided with the required data",


"__GENERIC_MATERIALS__.header": "=====================",
Expand Down
4 changes: 2 additions & 2 deletions kubejs/client_scripts/JEI_modespecific.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// /kjs inventory will be your friend.

JEIEvents.hideItems(event => {
if (isNormalMode) {
//GT Steam Age
const gtMachines = ['extractor', 'macerator', 'compressor', 'forge_hammer', 'furnace', 'alloy_smelter']
if (isNormalMode) {
//GT Steam Age
gtMachines.forEach(machine => {
event.hide(['gtceu:lp_steam_' + machine, 'gtceu:hp_steam_' + machine])
})
Expand Down
4 changes: 2 additions & 2 deletions kubejs/client_scripts/tooltips.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ ItemEvents.tooltip(tooltip => {
tooltip.addAdvanced('kubejs:debug_laser', (item, adv, text) => {
text.add(Text.join('You need to be a ', rainbowify('dev', Math.round(Client.lastNanoTime / 100000000)), ' to use this'))
});

// dml glitch armor
tooltip.add('kubejs:glitch_fragment', Text.translatable('item.kubejs.glitch_fragment.desc'))
tooltip.add('kubejs:glitch_infused_ingot', Text.translatable('item.kubejs.glitch_infused_ingot.desc'))
Expand All @@ -70,10 +70,10 @@ ItemEvents.tooltip(tooltip => {
tooltip.add('gtceu:basic_microverse_projector', Text.translatable('gtceu.basic_microverse_projector.desc'))
tooltip.add('gtceu:advanced_microverse_projector', Text.translatable('gtceu.advanced_microverse_projector.desc'))
tooltip.add('gtceu:advanced_microverse_projector_ii', Text.translatable('gtceu.advanced_microverse_projector_ii.desc'))
tooltip.add('gtceu:creative_tank_fabricator', Text.translatable('gtceu.creative_tank_fabricator.desc'))
tooltip.add('gtceu:advanced_assline', Text.translatable('gtceu.advanced_assline.desc'))
tooltip.add('gtceu:advanced_microverse_projector_iii', Text.translatable('gtceu.advanced_microverse_projector_iii.desc'))
tooltip.add('gtceu:advanced_microverse_projector_iii', Text.translatable('gtceu.advanced_microverse_projector_iii_2.desc'))
tooltip.add('gtceu:subatomic_digital_assembler', Text.translatable('gtceu.subatomic_digital_assembler.desc'))

tooltip.addAdvanced('gtceu:naquadah_reactor_i', (item, adv, text) => {
text.add(1, Text.gray('An advanced reactor that produces energy from the decay of Enriched Naquadah and Naquadria bolts'))
Expand Down
4 changes: 2 additions & 2 deletions kubejs/server_scripts/Netherite.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ ServerEvents.recipes(event => {
//Nethline
event.remove({ input: "minecraft:netherite_scrap" })

event.recipes.gtceu.forming_press('inert_nether_compound_ingot')
.itemInputs('gtceu:hot_europium_ingot', '4x gtceu:dark_soularium_dust', '4x kubejs:primal_mana')
event.recipes.gtceu.large_material_press('inert_nether_compound_ingot')
.itemInputs('gtceu:hot_europium_ingot', '32x hostilenetworks:nether_prediction', '4x gtceu:dark_soularium_dust', '4x kubejs:primal_mana')
.itemOutputs('kubejs:inert_nether_compound_ingot')
.duration(600)
.EUt(16380)
Expand Down
20 changes: 10 additions & 10 deletions kubejs/server_scripts/gregtech/supercomputer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
ServerEvents.recipes(event => {
function supercomp(model, prediction, EUt) {
event.recipes.gtceu.simulation_supercomputer(`kubejs:${model}`)
.notConsumable(Item.of('hostilenetworks:data_model', '{data_model:{id:"hostilenetworks:' + model + '"}}').weakNBT())
.itemInputs('hostilenetworks:prediction_matrix')
.itemOutputs('hostilenetworks:' + prediction + '_prediction')
.chancedOutput(Item.of('hostilenetworks:prediction', '{data_model:{id:"hostilenetworks:' + model + '"}}'), 3000, 500)
.duration(15.05 * 20) // same for all recipes
.EUt(EUt)
}
if (isNormalMode) {
////// Machine Recipe //////

Expand All @@ -12,15 +21,6 @@ ServerEvents.recipes(event => {

////// Computer Recipes //////

function supercomp(model, prediction, EUt) {
event.recipes.gtceu.simulation_supercomputer(`kubejs:${model}`)
.notConsumable(Item.of('hostilenetworks:data_model', '{data_model:{id:"hostilenetworks:' + model + '"}}').weakNBT())
.itemInputs('hostilenetworks:prediction_matrix')
.itemOutputs('hostilenetworks:' + prediction + '_prediction')
.chancedOutput(Item.of('hostilenetworks:prediction', '{data_model:{id:"hostilenetworks:' + model + '"}}'), 3000, 500)
.duration(15.05 * 20) // same for all recipes
.EUt(EUt)
}

supercomp('thermal/thermal_elemental', 'overworld', 256)
supercomp('shulker', 'end', 128)
Expand All @@ -38,4 +38,4 @@ ServerEvents.recipes(event => {
supercomp('creeper', 'overworld', 16)
supercomp('enderman', 'end', 512)
}
})
})
17 changes: 9 additions & 8 deletions kubejs/server_scripts/gregtech/superfabricator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
ServerEvents.recipes(event => {
function fabricator(prediction, circuit, output) {
event.recipes.gtceu.loot_superfabricator(`kubejs:${prediction}_${circuit}`)
.itemInputs(Item.of('hostilenetworks:prediction', '{data_model:{id:"hostilenetworks:' + prediction + '"}}').weakNBT())
.circuit(circuit)
.itemOutputs(output)
.duration(3 * 20) // same for all recipes
.EUt(64) // same for all recipes
}
if (isNormalMode) {
////// Machine Recipe //////

Expand All @@ -11,14 +19,7 @@ ServerEvents.recipes(event => {
.EUt(1966080)

////// Fabricator Recipes //////
function fabricator(prediction, circuit, output) {
event.recipes.gtceu.loot_superfabricator(`kubejs:${prediction}_${circuit}`)
.itemInputs(Item.of('hostilenetworks:prediction', '{data_model:{id:"hostilenetworks:' + prediction + '"}}').weakNBT())
.circuit(circuit)
.itemOutputs(output)
.duration(3 * 20) // same for all recipes
.EUt(64) // same for all recipes
}


fabricator('blaze', 1, '10x minecraft:blaze_rod')
fabricator('blaze', 2, '32x gtceu:sulfur_dust')
Expand Down
7 changes: 4 additions & 3 deletions kubejs/server_scripts/gregtech/tank_fabricator.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ServerEvents.recipes(event => {
event.shaped(
'gtceu:creative_tank_fabricator', [
'gtceu:subatomic_digital_assembler', [
'EFE',
'GCG',
'LUL'
Expand All @@ -12,11 +12,12 @@ ServerEvents.recipes(event => {
C: 'gtceu:atomic_casing',
U: 'gtceu:uv_field_generator'
}
).id('kubejs:shaped/creative_tank_fabricator')
).id('kubejs:shaped/subatomic_digital_assembler')

event.recipes.gtceu.creative_tank_fabricator('kubejs:creative_tank')
event.recipes.gtceu.subatomic_digital_assembly('kubejs:creative_tank')
.notConsumable('kubejs:creative_portable_tank_mold')
.itemOutputs('gtceu:creative_tank')
.CWUt(64)
.duration(500)
.EUt(100000)
})
34 changes: 2 additions & 32 deletions kubejs/server_scripts/normal_mode.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// THIS FILE IS FOR RANDOM RECIPES THAT DOESNT REQUIRE THEIR OWN FILE

ServerEvents.recipes(event => {
const carbonSources = ["gtceu:coal_dust", "gtceu:charcoal_dust", "gtceu:carbon_dust"]
const gtMachines = ['extractor', 'macerator', 'compressor', 'forge_hammer', 'furnace', 'alloy_smelter']
if (isNormalMode) {
// Moni Steel
event.remove({ type: "gtceu:electric_blast_furnace", output: "gtceu:steel_ingot" })
event.smelting("gtceu:steel_ingot", "gtceu:steel_dust")

const carbonSources = ["gtceu:coal_dust", "gtceu:charcoal_dust", "gtceu:carbon_dust"]
carbonSources.forEach(carbonSource => {
event.recipes.gtceu.alloy_smelter("steel_" + carbonSource.replace(/\W/g, '')) // The replace line removes non alphanumeric chars, regex is magic
.itemInputs("#forge:ingots/iron", carbonSource)
Expand Down Expand Up @@ -39,37 +40,6 @@ ServerEvents.recipes(event => {
.duration(364)
.EUt(15)

// Change recipes for LV and MV macerators
event.shaped(
"gtceu:lv_macerator", [
'PMB',
'WWH',
'CCW'
], {
P: "gtceu:lv_electric_piston",
M: "gtceu:lv_electric_motor",
B: "gtceu:wrought_iron_buzz_saw_blade",
W: "gtceu:tin_single_cable",
H: "gtceu:lv_machine_hull",
C: "#gtceu:circuits/lv"
}
).id('gtceu:shaped/lv_macerator')

event.shaped(
"gtceu:mv_macerator", [
'PMB',
'WWH',
'CCW'
], {
P: "gtceu:mv_electric_piston",
M: "gtceu:mv_electric_motor",
B: "gtceu:steel_buzz_saw_blade",
W: "gtceu:copper_single_cable",
H: "gtceu:mv_machine_hull",
C: "#gtceu:circuits/mv"
}
).id('gtceu:shaped/mv_macerator')

// Alternative LV piston recipe
event.shaped(
"gtceu:lv_electric_piston", [
Expand Down
1 change: 0 additions & 1 deletion kubejs/server_scripts/random_recipes.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ ServerEvents.recipes(event => {
C: "#gtceu:circuits/mv"
}
).id('gtceu:shaped/mv_macerator')

// Data Stuff
event.recipes.gtceu.extractor("tank_data")
.itemInputs("kubejs:heart_of_a_universe")
Expand Down
2 changes: 1 addition & 1 deletion kubejs/startup_scripts/Item_Registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ StartupEvents.registry('item', event => {

for (const [theme, volt] of mainframes) {
event.create(`${theme}_processor_mainframe`)
.displayName(`${theme.split('_').map(v => capitalize(v)).join(" ")} Processor Mainframe}`)
.displayName(`${theme.split('_').map(v => capitalize(v)).join(" ")} Processor Mainframe`)
.textureJson({ layer0: `kubejs:item/circuits/${theme}_processor_mainframe_base`, layer1: "kubejs:item/circuits/processor_mainframe_lights" })
.tooltip(`${volt}-Tier Circuit`)
}
Expand Down
57 changes: 42 additions & 15 deletions kubejs/startup_scripts/Multiblock_Registry.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const Tags = Java.loadClass('dev.latvian.mods.kubejs.util.Tags')

// Small Microverse Projector Recipe Type

GTCEuStartupEvents.registry('gtceu:recipe_type', event => {
event.create('basic_microverse')
.category('multiblock')
Expand Down Expand Up @@ -94,8 +95,8 @@ GTCEuStartupEvents.registry('gtceu:recipe_type', event => {
.setProgressBar(GuiTextures.PROGRESS_BAR_ARROW, FillDirection.LEFT_TO_RIGHT)
.setSound(GTSoundEntries.COOLING)

// Creative Tank Fabricator
event.create('creative_tank_fabricator')
// Subatomic Digital Assembler
event.create('subatomic_digital_assembly')
.category('multiblock')
.setEUIO('in')
.setMaxIOSize(1, 1, 0, 0) //
Expand All @@ -122,17 +123,31 @@ GTCEuStartupEvents.registry('gtceu:recipe_type', event => {
.setProgressBar(GuiTextures.PROGRESS_BAR_ARROW, FillDirection.LEFT_TO_RIGHT)
.setSound(GTSoundEntries.COMPUTATION)


// Large Material Press
event.create('large_material_press')
.category('multiblock')
.setEUIO('in')
.setMaxIOSize(6, 1, 0, 0)
.setSlotOverlay(false, false, GuiTextures.SOLIDIFIER_OVERLAY)
.setProgressBar(GuiTextures.PROGRESS_BAR_COMPRESS, FillDirection.LEFT_TO_RIGHT)
.setSound(GTSoundEntries.COMPRESSOR)
.setIconSupplier(() => Item.of('gtceu:large_material_press'))
//Omnic Forge
event.create('omnic_forge')
.category('multiblock')
.setEUIO('in')
.setMaxIOSize(6, 1, 0, 0)
.setSlotOverlay(false, false, GuiTextures.SOLIDIFIER_OVERLAY)
.setProgressBar(GuiTextures.PROGRESS_BAR_ARROW, FillDirection.LEFT_TO_RIGHT)
})

})

// Basic Microverse Projector
GTCEuStartupEvents.registry('gtceu:machine', event => {

GCyMMachines.LARGE_MATERIAL_PRESS.setRecipeTypes([GTRecipeTypes.BENDER_RECIPES, GTRecipeTypes.COMPRESSOR_RECIPES, GTRecipeTypes.FORGE_HAMMER_RECIPES, GTRecipeTypes.FORMING_PRESS_RECIPES, GTRecipeTypes.get('large_material_press')])

event.create('basic_microverse_projector', 'multiblock')
.rotationState(RotationState.NON_Y_AXIS)
.recipeTypes('basic_microverse')
Expand Down Expand Up @@ -322,20 +337,33 @@ event.create('draconic_reactor', 'multiblock')

// Creative Tank Fabricator
// TODO: Cooler Design, thinking about some kind of computer that fabricates the tanks from the data
event.create('creative_tank_fabricator', 'multiblock')
event.create('subatomic_digital_assembler', 'multiblock')
.rotationState(RotationState.NON_Y_AXIS)
.recipeTypes('creative_tank_fabricator')
.recipeTypes('subatomic_digital_assembly')
.appearanceBlock(GCyMBlocks.CASING_ATOMIC)
.pattern(definition => FactoryBlockPattern.start()
.aisle("CCC", "GGG", "CCC")
.aisle("CCC", "G#G", "CCC")
.aisle("CSC", "GGG", "CCC")
.where('S', Predicates.controller(Predicates.blocks(definition.get())))
.where('G', Predicates.blocks(GTBlocks.CASING_TEMPERED_GLASS.get()))
.where('C', Predicates.blocks("gtceu:atomic_casing").setMinGlobalLimited(10)
.or(Predicates.autoAbilities(definition.getRecipeTypes())))
.where('#', Predicates.any())
.build())
.aisle("#CCCCC#", "#CCCCC#", "#CGGGC#", "#CGGGC#", "#CGGGC#", "#CGGGC#", "#CGGGC#", "#CCCCC#", "#CCCCC#")
.aisle("CCCCCCC", "CHMMMHC", "CHAAAHC", "CHAAAHC", "CHAAAHC", "CHAAAHC", "CHAAAHC", "CHMMMHC", "CCCCCCC")
.aisle("CCCCCCC", "CMXYXMC", "GAXYXAG", "GAXYXAG", "GAXYXAG", "GAXYXAG", "GAXYXAG", "CMXYXMC", "CCCCCCC")
.aisle("CCCCCCC", "CMYYYMC", "GAYYYAG", "GAYYYAG", "GAYYYAG", "GAYYYAG", "GAYYYAG", "CMYYYMC", "CCCCCCC")
.aisle("CCCCCCC", "CMXYXMC", "GAXYXAG", "GAXYXAG", "GAXYXAG", "GAXYXAG", "GAXYXAG", "CMXYXMC", "CCCCCCC")
.aisle("CCCCCCC", "CHMMMHC", "CHAAAHC", "CHAAAHC", "CHAAAHC", "CHAAAHC", "CHAAAHC", "CHMMMHC", "CCCCCCC")
.aisle("CCCCCCC", "CCCCCCC", "#CCCCC#", "#CCCCC#", "#CCCCC#", "#CCCCC#", "#CCCCC#", "CCCCCCC", "CCCCCCC")
.aisle("CCCCCCC", "#CCCCC#", "#CCCCC#", "#CNNNC#", "###N###", "###N###", "###N###", "#CNNNC#", "CCCCCCC")
.aisle("#CCCCC#", "##CSC##", "##CCC##", "#######", "#######", "#######", "#######", "#######", "#CCCCC#")
.where('S', Predicates.controller(Predicates.blocks(definition.get())))
.where('G', Predicates.blocks(GTBlocks.CLEANROOM_GLASS.get()))
.where('H', Predicates.blocks(GTBlocks.HIGH_POWER_CASING.get()))
.where('M', Predicates.blocks("gtceu:crystal_matrix_frame"))
.where('N', Predicates.blocks("gtceu:naquadah_alloy_frame"))
.where('X', Predicates.blocks(GTBlocks.COMPUTER_CASING.get()))
.where('Y', Predicates.blocks(GTBlocks.ADVANCED_COMPUTER_CASING.get()))
.where('C', Predicates.blocks("gtceu:atomic_casing").setMinGlobalLimited(220)
.or(Predicates.autoAbilities(definition.getRecipeTypes()))
.or(Predicates.blocks("gtceu:computation_receiver_hatch").setExactLimit(1)))
.where('A', Predicates.any())
.where('#', Predicates.any())
.build())
.workableCasingRenderer("gtceu:block/casings/gcym/atomic_casing",
"gtceu:block/multiblock/implosion_compressor", false)

Expand Down Expand Up @@ -505,5 +533,4 @@ event.create('loot_superfabricator', 'multiblock')
.build())
.workableCasingRenderer("kubejs:block/draconium/casing",
"gtceu:block/multiblock/implosion_compressor", false)

})

0 comments on commit a350674

Please sign in to comment.