Fission update (#2281)

* Change structure of kubejs files

* Fix some stuffs
This commit is contained in:
TomPlop 2025-11-23 17:34:37 -05:00 committed by GitHub
parent 0c2c7f7d25
commit 5491daa32f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 159 additions and 115 deletions

View file

@ -7,22 +7,4 @@ function registerDeaFissionRecipes(event) {
event.remove({ id: 'deafission:fission_reactor_coolant/thorium/nak_to_plasma' })
event.remove({ id: 'deafission:fission_reactor_coolant/uranium/water_to_steam' })
let component = function (type, block, value) {
event.custom({
type: 'deafission:fission_component',
componentType: type,
block: block,
data: {
value: value
}
});
};
// Examples: https://bitbucket.org/Vazde/minecraft-fission/src/master/mod/settings-run/kubejs/server_scripts/recipes.js
component("HEAT", "minecraft:blue_ice", 0.5)
component("HEAT", "tfg:glacian_wool_frame", 2);
component("HEAT", "tfg:aes_insulation_frame", 1);
component("HEAT", "tfg:moderate_core_frame", 10);
component("HEAT", "tfg:impure_moderate_core_frame", 5);
}

View file

@ -54,6 +54,7 @@ ServerEvents.tags('item', event => {
registerTFCItemTags(event)
registerTFCTextileItemTags(event)
registerTFGItemTags(event)
registerTFGItemTagsNuclear(event)
registerTFCLunchboxItemTags(event)
registerVintageImprovementsItemTags(event)
registerWABItemTags(event)
@ -91,6 +92,7 @@ ServerEvents.tags('block', event => {
registerTACZBlockTags(event)
registerTFCBlockTags(event)
registerTFGBlockTags(event)
registerTFGBlockTagsNuclear(event)
registerVintageImprovementsBlockTags(event)
registerWABBlockTags(event)
})
@ -108,6 +110,7 @@ ServerEvents.tags('fluid', event => {
registerFirmaLifeFluidTags(event)
registerTFCFluidTags(event)
registerTFGFluidTags(event)
registerTFGFluidTagsNuclear(event)
registerVintageImprovementsFluidTags(event)
})

View file

@ -0,0 +1,41 @@
// priority: 0
"use strict";
function registerTFGNuclearComponentsRecipes(event) {
let component = function (type, block, value) {
event.custom({
type: 'deafission:component_fr',
componentType: type,
block: block,
data: {
value: value
}
});
};
let componentThermal = function(type, block, temp, cap) {
event.custom({
type: 'deafission:component_hb',
componentType: type,
block: block,
data: {
temperature: temp,
capacity: cap
}
});
};
// Examples: https://bitbucket.org/Vazde/minecraft-fission/src/master/mod/settings-run/kubejs/server_scripts/recipes.js
component("HEAT", "minecraft:blue_ice", 0.5)
component("HEAT", "tfg:glacian_wool_frame", 2);
component("HEAT", "tfg:aes_insulation_frame", 1);
component("HEAT", "tfg:moderate_core_frame", 10);
component("HEAT", "tfg:impure_moderate_core_frame", 5);
/*
componentThermal('THERMAL', 'minecraft:sand', 1000, 25);
componentThermal('THERMAL', 'tfg:impure_moderate_core_frame', 2000, 50);
componentThermal('THERMAL', 'minecraft:bedrock', 9001, 1e5);
*/
}

View file

@ -57,14 +57,13 @@ function registerTFGNuclearRecipes(event) {
.EUt(GTValues.VA[GTValues.EV])
.dimension('ad_astra:mars')
/* REMOVE FOR VENUS COMMENTED OUT
event.recipes.gtceu.nuclear_fuel_factory('tfg:tbu_232_rod')
.inputFluids(Fluid.of('gtceu:nuclear_waste', 32000))
.itemInputs('#forge:ingots/thorium_232', 'tfg:empty_rod')
.itemOutputs('tfg:tbu-232_rod')
.duration(20*300)
.EUt(GTValues.V[GTValues.IV])
*/
event.recipes.gtceu.lathe('tfg:empty_rod')
.itemInputs('gtceu:cobalt_large_restrictive_item_pipe')
.itemOutputs('tfg:empty_rod')
@ -215,15 +214,6 @@ function registerTFGNuclearRecipes(event) {
//#region Fission Reactor
// Recipe for Thorium Reactor Just keeping it in case we got mod issues
/* event.recipes.gtceu.fission_reactor('thorium_uranium_waste')
.itemInputs('#forge:bolts/thorium_rod')
.inputFluids(Fluid.of('minecraft:water', 100))
.outputFluids(Fluid.of('gtceu:dense_steam', 100))
.outputFluids(Fluid.of('gtceu:uranium_waste', 20))
.duration(20*50)
.EUt(32)*/
// Thorium Fission
event.recipes.deafission.fission_reactor_fuel('tfg:thorium')
@ -244,15 +234,6 @@ function registerTFGNuclearRecipes(event) {
.addData("coolant_heat_per_tick", 1)
.duration(1);
// Recipe for Uranium Reactor Just keeping it in case we got mod issues
/* event.recipes.gtceu.fission_reactor('uranium_radioactive')
.itemInputs('#forge:bolts/uranium_rod')
.inputFluids(Fluid.of('tfg:heavy_water', 75))
.outputFluids(Fluid.of('gtceu:radioactive_steam', 75))
.outputFluids(Fluid.of('gtceu:radioactive_waste', 50))
.duration(20*100)
.EUt(32)*/
// Uranium Fission
event.recipes.deafission.fission_reactor_fuel('tfg:uranium')
@ -272,15 +253,6 @@ function registerTFGNuclearRecipes(event) {
.duration(1)
.dimension('ad_astra:mars')
// Recipe for Plutonium Reactor Just keeping it in case we got mod issues
/* event.recipes.gtceu.fission_reactor('plutonium_irradiated')
.itemInputs('#forge:bolts/plutonium_rod')
.inputFluids(Fluid.of('tfg:heavy_water', 2000))
.outputFluids(Fluid.of('gtceu:irradiated_steam', 2000))
.outputFluids(Fluid.of('gtceu:tritiated_water', 50))
.duration(20*100)
.EUt(32)*/
// Plutonium Fission
event.recipes.deafission.fission_reactor_fuel('tfg:plutonium')
@ -300,15 +272,23 @@ function registerTFGNuclearRecipes(event) {
.duration(1)
.dimension('ad_astra:mars')
// Fission Reactor for Energy Just keeping it in case we got mod issues
// TBU Fission
/*
event.recipes.gtceu.fission_reactor('tbu_reactor')
.itemInputs('tfg:tbu_232_rod')
.inputFluids(Fluid.of('gtceu:flibe', 1000))
.outputFluids(Fluid.of('gtceu:hot_flibe', 1000))
.outputFluids(Fluid.of('gtceu:nuclear_waste', 500))
.duration(20*100)
.EUt(32)
event.recipes.deafission.fission_reactor_fuel('kubejs:fuelcell_custom_x1')
.itemInputs('tfg:tbu_232_rod')
.itemOutputs('minecraft:dirt')
// Mandatory by GT; no real impact. Use this as a convention:
// durability / const / heatValue
.duration(10000 / 0.4 / 2)
.dimension('ad_astra:mars');
event.recipes.deafission.fission_reactor_coolant('tfg:tbu_coolant')
.itemInputs(Ingredient.of([
'tfg:tbu_232_rod']))
.inputFluids(Fluid.of('tfg:heavy_water', 100))
.outputFluids(Fluid.of('gtceu:dense_steam', 100))
.addData("coolant_heat_per_tick", 12.34)
.duration(1000);
*/
//#endregion
@ -346,7 +326,7 @@ function registerTFGNuclearRecipes(event) {
.EUt(GTValues.VA[GTValues.EV])
.duration(20*9)
// Graphite Moderator Line
//#region Graphite Moderator Line
const $ChanceLogic = Java.loadClass('com.gregtechceu.gtceu.api.recipe.chance.logic.ChanceLogic')
@ -461,6 +441,7 @@ function registerTFGNuclearRecipes(event) {
//#endregion
//#region Cooling Tower
/*
event.recipes.gtceu.assembler('tfg:ostrum_carbon_casing')
.itemInputs('2x #forge:plates/ostrum', '2x #forge:plates/titanium_carbide', '#forge:dense_plates/hsla_steel', '#forge:frames/black_steel')
.itemOutputs('2x tfg:casings/machine_casing_ostrum_carbon')
@ -483,6 +464,8 @@ function registerTFGNuclearRecipes(event) {
.circuit(6)
.EUt(GTValues.VA[GTValues.IV] * 2)
.duration(20*4)
*/
/*
event.shaped('tfg:cooling_tower', [
'ABA',
@ -496,8 +479,15 @@ function registerTFGNuclearRecipes(event) {
E: 'gtceu:iv_fluid_regulator'
}).id('tfg:shaped/cooling_tower')
*/
//#endregion
//#endregion
/*
event.recipes.deafission.hb_import('tfg:dense_steam')
.inputFluids(Fluid.of('gtceu:dense_steam', 100))
.outputFluids(Fluid.of('minecraft:water', 10))
.blastFurnaceTemp(4000)
.addData("hb_energy", 100)
*/
//#region FLiBe Line - SCRAP FROM MARS TO VENUS
/*
@ -710,4 +700,6 @@ function registerTFGNuclearRecipes(event) {
*/
}

View file

@ -0,0 +1,52 @@
"use strict";
const registerTFGItemTagsNuclear = (event) => {
//Fission Nucleat Fuel
event.add('deafission:fuels', 'tfg:thorium_rod')
event.add('deafission:fuels', 'tfg:uranium_rod')
event.add('deafission:fuels', 'tfg:plutonium_rod')
event.add('tfg:fission_rods', '#deafission:fuels')
}
const registerTFGBlockTagsNuclear = (event) => {
//#region Fision Components
let COMPONENTS_FR = 'deafission:components_fr';
// Max Heating
event.add(COMPONENTS_FR, 'tfg:glacian_wool_frame'); // Max Heat 2
event.add(COMPONENTS_FR, 'minecraft:blue_ice'); // Max Heat 0.5
event.add(COMPONENTS_FR, 'tfg:aes_insulation_frame'); // Max Heat 1
event.add(COMPONENTS_FR, 'tfg:moderate_core_frame'); // Max Heat 10
event.add(COMPONENTS_FR, 'tfg:impure_moderate_core_frame'); // Max Heat 5
//event.add(COMPONENTS, 'minecraft:blue_ice'); // Max Heat 0.5
event.add(COMPONENTS_FR, 'minecraft:bedrock'); // Max Heat 10000 CREATIVE BLOCK
// Increase Throttle
//event.add(COMPONENTS_FR, 'minecraft:iron_block');
// Increase Effiency
//event.add(COMPONENTS_FR, 'minecraft:packed_ice');
event.add('tfg:fission_coolant','deafission:components')
// Heat Battery Components
let COMPONENTS_HB = 'deafission:components_hb';
event.add(COMPONENTS_HB, 'minecraft:sand');
event.add(COMPONENTS_HB, 'tfg:impure_moderate_core_frame');
event.add(COMPONENTS_HB, 'minecraft:bedrock'); // For Creative usage only
//#endregion
}
//#endregion
//#region Fluids
const registerTFGFluidTagsNuclear = (event) => {
}

View file

@ -19,6 +19,7 @@ const registerTFGRecipes = (event) => {
registerTFGSpaceRecipes(event)
registerTFGStoneDustRecipes(event)
registerTFGNuclearRecipes(event)
registerTFGNuclearComponentsRecipes(event)
registerTFGBiochemRecipes(event)
registerTFGSpaceOres(event)
}

View file

@ -63,12 +63,6 @@ const registerTFGItemTags = (event) => {
event.add('tfg:components/uv_leds', 'tfg:uv_led')
event.add('tfg:components/uv_leds', 'tfg:smd_uv_led')
//Fission Nucleat Fuel
event.add('deafission:fuels', 'tfg:thorium_rod')
event.add('deafission:fuels', 'tfg:uranium_rod')
event.add('deafission:fuels', 'tfg:plutonium_rod')
event.add('tfg:fission_rods', '#deafission:fuels')
// Platline
event.add('tfg:platinum_ore_group', 'gtceu:purified_pentlandite_ore')
event.add('tfg:platinum_ore_group', 'gtceu:purified_chalcopyrite_ore')
@ -671,27 +665,6 @@ const registerTFGBlockTags = (event) => {
event.add('buildinggadgets2:deny', 'tfg:geyser_source_small')
event.add('ae2:blacklisted/spatial', 'tfg:geyser_source_small')
//#region Fision Components
let COMPONENTS = 'deafission:components';
// Max Heating
event.add(COMPONENTS, 'tfg:glacian_wool_frame'); // Max Heat 2
event.add(COMPONENTS, 'minecraft:blue_ice'); // Max Heat 0.5
event.add(COMPONENTS, 'tfg:aes_insulation_frame'); // Max Heat 1
event.add(COMPONENTS, 'tfg:moderate_core_frame'); // Max Heat 10
event.add(COMPONENTS, 'tfg:impure_moderate_core_frame'); // Max Heat 5
//event.add(COMPONENTS, 'minecraft:blue_ice'); // Max Heat 0.5
event.add(COMPONENTS, 'minecraft:bedrock'); // Max Heat 10000 CREATIVE BLOCK
// Increase Throttle
//event.add(COMPONENTS, 'minecraft:iron_block');
// Increase Effiency
//event.add(COMPONENTS, 'minecraft:packed_ice');
event.add('tfg:fission_coolant','deafission:components')
//#endregion
// #region Nether blocks

View file

@ -216,6 +216,8 @@ const registerTFGNuclearMaterials = (event) => {
//#endregion
};
//#region Fuel Pellet
/*
@ -230,38 +232,36 @@ const registerTFGNuclearMaterials = (event) => {
So purely passively it reaches 20000.0 heat.
*/
}
const $FuelCellItem = Java.loadClass("fi.dea.mc.deafission.common.data.items.FuelCellItem");
const $DepletedFuelCellItem = Java.loadClass("fi.dea.mc.deafission.common.data.items.DepletedFuelCellItem");
//const $ComponentTotals = Java.loadClass("fi.dea.mc.deafission.core.components.ComponentTotals");
//const $ReactorBaseStats = Java.loadClass("fi.dea.mc.deafission.core.ReactorBaseStats");
//$ReactorBaseStats.Smr1 = new $ComponentTotals(200, 0, 0);
StartupEvents.registry("item", (event) => {
event.createCustom("tfg:thorium_rod", () => {
return new $FuelCellItem(
5000,
1,
0.7 // Max Heat 139 - 1 Fuel
);
})
event.createCustom("tfg:uranium_rod", () => {
return new $FuelCellItem(
20000,
1,
2.2 // Max Heat 435 - 1 Fuel
);
})
event.createCustom("tfg:plutonium_rod", () => {
return new $FuelCellItem(
30000,
1,
3.0 // Max Heat 595 - 1 Fuel
);
})
const fuel = function(id, durability, rods, heat, createDepleted) {
event.createCustom("tfg:tbu_232_rod", () => {
return new $FuelCellItem(
20000,
1,
2.0
);
})
});
if (createDepleted === undefined) createDepleted = true;
event.createCustom("tfg:" + id, () => {
return new $FuelCellItem(
durability,
rods,
heat
);
});
if (createDepleted) {
event.createCustom("tfg:depleted_" + id, () => {
return new $DepletedFuelCellItem();
});
}
};
fuel("thorium_rod", 5000, 1, 0.7, false);// Max Heat 139 - 1 Fuel
fuel("uranium_rod", 20000, 1, 2.2, false);// Max Heat 435 - 1 Fuel
fuel("plutonium_rod", 30000, 4, 3, false);// Max Heat 595 - 1 Fuel
fuel("tbu_232_rod", 10000, 1, 2);
});