fixed the plutonium ore crash on new worlds, removed all the other plutonium recipes

This commit is contained in:
Pyritie
2025-10-05 15:54:58 +01:00
parent 6b7d743ea2
commit 58da363b09
5 changed files with 69 additions and 58 deletions

View File

@@ -779,6 +779,15 @@ function removeGTCEURecipes(event) {
armor.forEach(armor => {
event.remove({ output: armor})
});
event.remove({ id: 'gtceu:shapeless/centrifuged_ore_to_dust_plutonium' })
event.remove({ id: 'gtceu:centrifuge/centrifuge_plutonium_dirty_dust_to_dust' })
event.remove({ id: 'gtceu:centrifuge/centrifuge_plutonium_pure_dust_to_dust' })
event.remove({ id: 'gtceu:large_chemical_reactor/radon_from_uranium_238' })
removeMaceratorRecipe(event, 'macerate_plutonium_refined_ore_to_dust')
event.remove({ id: 'gtceu:ore_washer/wash_plutonium_pure_dust_to_dust' })
event.remove({ id: 'gtceu:ore_washer/wash_plutonium_dirty_dust_to_dust' })
event.remove({ id: 'gtceu:forge_hammer/hammer_plutonium_refined_ore_to_dust' })
}
function removeMaceratorRecipe(event, id) {

View File

@@ -196,6 +196,17 @@ global.GTCEU_DISABLED_ITEMS = /** @type {const} */ ([
"gtceu:hv_bedrock_ore_miner",
"gtceu:ev_bedrock_ore_miner",
// Plutonium ores
"gtceu:raw_plutonium",
"gtceu:poor_raw_plutonium",
"gtceu:rich_raw_plutonium",
"gtceu:raw_plutonium_block",
"gtceu:refined_plutonium_ore",
"gtceu:purified_plutonium_ore",
"gtceu:crushed_plutonium_ore",
"gtceu:impure_plutonium_dust",
"gtceu:pure_plutonium_dust",
"gtceu:plutonium_surface_rock"
]);
//#endregion

View File

@@ -46,6 +46,8 @@ const registerGTCEuMaterialModification = (event) => {
GENERATE_RING,
GENERATE_FOIL,
GENERATE_FINE_WIRE,
NO_ORE_PROCESSING_TAB,
NO_ORE_SMELTING
} = $MATERIAL_FLAGS
const metalTooling = [
@@ -281,7 +283,6 @@ const registerGTCEuMaterialModification = (event) => {
GTMaterials.IronMagnetic.addFlags(GENERATE_PLATE)
GTMaterials.Silicon.addFlags(GENERATE_DENSE);
GTMaterials.RTMAlloy.addFlags(GENERATE_DENSE);
GTMaterials.Lead.addFlags(GENERATE_DENSE);
@@ -289,6 +290,9 @@ const registerGTCEuMaterialModification = (event) => {
GTMaterials.TreatedWood.addFlags(GENERATE_LONG_ROD);
// Hide ore processing tab for plutonium
GTMaterials.Plutonium239.addFlags(NO_ORE_PROCESSING_TAB, NO_ORE_SMELTING)
GTMaterials.Stone.setProperty(PropertyKey.TOOL, ToolProperty.Builder.of(1.2, 1.0, 8, 1, [
GTToolType.AXE,
GTToolType.HARD_HAMMER,

View File

@@ -3,47 +3,50 @@
const registerTFCTagPrefixes = (event) => {
// These ores break worldgen if removed somehow?
// TagPrefix.ORES.remove(TagPrefix.ore)
TagPrefix.ORES.remove(TagPrefix.oreDeepslate)
TagPrefix.ORES.remove(TagPrefix.oreTuff)
TagPrefix.ORES.remove(TagPrefix.oreSand)
TagPrefix.ORES.remove(TagPrefix.oreRedSand)
TagPrefix.ORES.remove(TagPrefix.oreMarble)
TagPrefix.ORES.remove(TagPrefix.oreGravel)
TagPrefix.ORES.remove(TagPrefix.oreEndstone)
TagPrefix.ORES.remove(TagPrefix.oreNetherrack)
TagPrefix.ORES.remove(TagPrefix.oreBlackstone)
// These ores break worldgen if removed somehow?
// TagPrefix.ORES.remove(TagPrefix.ore)
TagPrefix.ORES.remove(TagPrefix.oreDeepslate)
TagPrefix.ORES.remove(TagPrefix.oreTuff)
TagPrefix.ORES.remove(TagPrefix.oreSand)
TagPrefix.ORES.remove(TagPrefix.oreRedSand)
TagPrefix.ORES.remove(TagPrefix.oreMarble)
TagPrefix.ORES.remove(TagPrefix.oreGravel)
TagPrefix.ORES.remove(TagPrefix.oreEndstone)
TagPrefix.ORES.remove(TagPrefix.oreNetherrack)
TagPrefix.ORES.remove(TagPrefix.oreBlackstone)
TagPrefix.ORES.remove(TagPrefix.oreBasalt)
TagPrefix.ORES.remove(TagPrefix.oreAndesite)
TagPrefix.ORES.remove(TagPrefix.oreDiorite)
TagPrefix.ORES.remove(TagPrefix.oreGranite)
TagPrefix.ORES.remove(TagPrefix.oreBasalt)
TagPrefix.ORES.remove(TagPrefix.oreAndesite)
TagPrefix.ORES.remove(TagPrefix.oreDiorite)
TagPrefix.ORES.remove(TagPrefix.oreGranite)
const shouldGenerateOre = (material) => {
return material.hasProperty(PropertyKey.ORE) && material !== GTMaterials.Plutonium239;
}
global.TFC_STONE_TYPES.forEach(stoneTypeName => {
const material = GTCEuAPI.materialManager.getMaterial(stoneTypeName)
event.create(`${stoneTypeName}`, 'ore')
.stateSupplier(() => Block.getBlock('minecraft:stone').defaultBlockState())
.baseModelLocation(`tfc:block/rock/raw/${stoneTypeName}`)
.unificationEnabled(true)
.materialSupplier(() => material)
.materialIconType(GTMaterialIconType.ore)
.generationCondition(shouldGenerateOre)
})
global.TFC_STONE_TYPES.forEach(stoneTypeName => {
const material = GTCEuAPI.materialManager.getMaterial(stoneTypeName)
event.create(`${stoneTypeName}`, 'ore')
.stateSupplier(() => Block.getBlock('minecraft:stone').defaultBlockState())
.baseModelLocation(`tfc:block/rock/raw/${stoneTypeName}`)
.unificationEnabled(true)
.materialSupplier(() => material)
.materialIconType(GTMaterialIconType.ore)
.generationCondition(ItemGenerationCondition.hasOreProperty)
})
// Custom stone types
// Can't use 'blackstone' for whatever reason -- GTM has its own
// blackstone ore type but it doesn't seem to work at all?
// This works around that
// blackstone ore type but it doesn't seem to work at all?
// This works around that
event.create('pyroxenite', 'ore')
.stateSupplier(() => Block.getBlock('minecraft:blackstone').defaultBlockState())
.baseModelLocation('minecraft:block/blackstone')
.unificationEnabled(true)
.materialIconType(GTMaterialIconType.ore)
.generationCondition(ItemGenerationCondition.hasOreProperty)
.generationCondition(shouldGenerateOre)
.materialSupplier(() => GTMaterials.Blackstone)
event.create('dripstone', 'ore')
@@ -51,56 +54,56 @@ const registerTFCTagPrefixes = (event) => {
.baseModelLocation('minecraft:block/dripstone_block')
.unificationEnabled(true)
.materialIconType(GTMaterialIconType.ore)
.generationCondition(ItemGenerationCondition.hasOreProperty)
.materialSupplier(() => GTCEuAPI.materialManager.getMaterial('dripstone'))
.generationCondition(shouldGenerateOre)
.materialSupplier(() => GTCEuAPI.materialManager.getMaterial('dripstone'))
// Redefine deepslate so it has the correct sound effects (yes I fixed this in GTM as well)
event.create('deepslate', 'ore')
.stateSupplier(() => Block.getBlock('minecraft:deepslate').defaultBlockState())
.baseModelLocation('minecraft:block/deepslate')
.unificationEnabled(true)
.materialIconType(GTMaterialIconType.ore)
.generationCondition(ItemGenerationCondition.hasOreProperty)
.generationCondition(shouldGenerateOre)
.materialSupplier(() => GTMaterials.Deepslate)
event.create('moon_stone', 'ore')
event.create('moon_stone', 'ore')
.stateSupplier(() => Block.getBlock('tfg:rock/hardened_moon_stone').defaultBlockState())
.baseModelLocation('ad_astra:block/moon_stone')
.unificationEnabled(true)
.materialIconType(GTMaterialIconType.ore)
.generationCondition(ItemGenerationCondition.hasOreProperty)
.generationCondition(shouldGenerateOre)
event.create('moon_deepslate', 'ore')
.stateSupplier(() => Block.getBlock('tfg:rock/hardened_moon_deepslate').defaultBlockState())
.baseModelLocation('ad_astra:block/moon_deepslate')
.unificationEnabled(true)
.materialIconType(GTMaterialIconType.ore)
.generationCondition(ItemGenerationCondition.hasOreProperty)
.generationCondition(shouldGenerateOre)
event.create('mars_stone', 'ore')
.stateSupplier(() => Block.getBlock('tfg:rock/hardened_mars_stone').defaultBlockState())
.baseModelLocation('ad_astra:block/mars_stone')
.unificationEnabled(true)
.materialIconType(GTMaterialIconType.ore)
.generationCondition(ItemGenerationCondition.hasOreProperty)
.generationCondition(shouldGenerateOre)
event.create('venus_stone', 'ore')
.stateSupplier(() => Block.getBlock('tfg:rock/hardened_venus_stone').defaultBlockState())
.baseModelLocation('ad_astra:block/venus_stone')
.unificationEnabled(true)
.materialIconType(GTMaterialIconType.ore)
.generationCondition(ItemGenerationCondition.hasOreProperty)
.generationCondition(shouldGenerateOre)
event.create('mercury_stone', 'ore')
.stateSupplier(() => Block.getBlock('tfg:rock/hardened_mercury_stone').defaultBlockState())
.baseModelLocation('ad_astra:block/mercury_stone')
.unificationEnabled(true)
.materialIconType(GTMaterialIconType.ore)
.generationCondition(ItemGenerationCondition.hasOreProperty)
.generationCondition(shouldGenerateOre)
event.create('glacio_stone', 'ore')
.stateSupplier(() => Block.getBlock('tfg:rock/hardened_glacio_stone').defaultBlockState())
.baseModelLocation('ad_astra:block/glacio_stone')
.unificationEnabled(true)
.materialIconType(GTMaterialIconType.ore)
.generationCondition(ItemGenerationCondition.hasOreProperty)
.generationCondition(shouldGenerateOre)
}

View File

@@ -7,8 +7,6 @@ function registerTFGTagPrefixes(event) {
excludeAllGemsButNormal(TFGHelpers.getMaterial('tfg:tetrafluoroethane'));
excludeAllGemsButNormal(TFGHelpers.getMaterial('tfg:crimsene'));
excludeAllGemsButNormal(TFGHelpers.getMaterial('tfg:warpane'));
excludeAllOresButDust(TFGHelpers.getMaterial('gtceu:plutonium'));
}
function excludeAllGemsButNormal(material) {
@@ -17,18 +15,4 @@ function excludeAllGemsButNormal(material) {
TagPrefix.gemFlawless.setIgnored(material);
TagPrefix.gemExquisite.setIgnored(material);
TagPrefix.block.setIgnored(material);
}
function excludeAllOresButDust(material) {
TagPrefix.rawOre.setIgnored(material);
TFGTagPrefix.poorRawOre.setIgnored(material);
TFGTagPrefix.richRawOre.setIgnored(material);
TagPrefix.rawOreBlock.setIgnored(material);
TagPrefix.crushedRefined.setIgnored(material);
TagPrefix.crushedPurified.setIgnored(material);
TagPrefix.crushed.setIgnored(material);
TagPrefix.dustImpure.setIgnored(material);
TagPrefix.dustPure.setIgnored(material);
TagPrefix.surfaceRock.setIgnored(material);
}