#Help with explaining materialModification

1 messages · Page 1 of 1 (latest)

manic arch
#

Hello, I stumbled upon this code on Cosmic Frontiers' GitHub:

GTCEuStartupEvents.materialModification(event => {
    TagPrefix.ingot['setIgnored(com.gregtechceu.gtceu.api.data.chemical.material.Material,java.util.function.Supplier[])'](GTMaterials.get('andesite_alloy'), () => Item.getItem('create:andesite_alloy')),
        TagPrefix.block['setIgnored(com.gregtechceu.gtceu.api.data.chemical.material.Material,java.util.function.Supplier[])'](GTMaterials.get('andesite_alloy'), () => Item.getItem('create:andesite_alloy_block')),
        TagPrefix.ingot['setIgnored(com.gregtechceu.gtceu.api.data.chemical.material.Material,java.util.function.Supplier[])'](GTMaterials.get('industrial_iron'), () => Item.getItem('createdeco:industrial_iron_ingot')),
        TagPrefix.block['setIgnored(com.gregtechceu.gtceu.api.data.chemical.material.Material,java.util.function.Supplier[])'](GTMaterials.get('industrial_iron'), () => Item.getItem('create:industrial_iron_block'))
})

I'd love if someone explained what one line does.
I assume it is either copying the tags of the items in the mods, or copying data, but I am not sure.
I also don't know if this is the right channel to ask this.

polar parrot
#

setIgnored stops GT from generating an item for that material

#

And replaces it what you specify

#

So in the first block, its replacing the GT Andesite Alloy Ingot with Create's andesite alloy

#

Same goes for vanilla iron ingot, gold ingot, blocks, etc.

manic arch
#

Ohhh, that makes sense now