added a potential fix for #944 suggested by ghosti, cleaned up some other abuses of it in tag events so now it's just indicators that still have to use it

This commit is contained in:
Pyritie 2025-05-02 01:05:01 +01:00
parent 3db90471cd
commit 506faeafd3
12 changed files with 43 additions and 46 deletions

View file

@ -64,7 +64,7 @@ function generatePlatedBlockRecipe(event, material) {
let outputMaterial = (tfcProperty == null || tfcProperty.getOutputMaterial() == null) ? material : tfcProperty.getOutputMaterial()
let plateItem = ChemicalHelper.get(TagPrefix.plate, material, 1);
let platedBlock = ChemicalHelper.get(TFGTagPrefix.blockPlated, material, 1);
let platedSlab = ChemicalHelper.get(TFGTagPrefix.slabPlated, material, 1);
let platedStair = ChemicalHelper.get(TFGTagPrefix.stairPlated, material, 1);
@ -162,4 +162,14 @@ function generatePlatedBlockRecipe(event, material) {
.duration(material.getMass())
.category(GTRecipeCategories.ARC_FURNACE_RECYCLING)
.EUt(GTValues.VA[GTValues.LV])
}
const $MRM = Java.loadClass('com.gregtechceu.gtceu.api.data.chemical.material.IMaterialRegistryManager')
function forEachMaterial(iterator) {
if (GTMaterialRegistry.getPhase() === $MRM.Phase.CLOSED || GTMaterialRegistry.getPhase() === $MRM.Phase.FROZEN) {
GTMaterialRegistry.getRegisteredMaterials().forEach(material => {
iterator(material)
})
}
}