use of gregtech.api.unification.material.properties.FluidProperty in project GregTech by GregTechCEu.
the class MetaFluids method init.
public static void init() {
fluidSprites.add(AUTO_GENERATED_PLASMA_TEXTURE);
registerIconFluidSprites();
// handle vanilla fluids
handleNonMaterialFluids(Materials.Water, FluidRegistry.WATER);
handleNonMaterialFluids(Materials.Lava, FluidRegistry.LAVA);
// alternative names for forestry fluids
addAlternativeNames();
// set custom textures for fluids
setCustomTextures();
for (Material material : GregTechAPI.MATERIAL_REGISTRY) {
FluidProperty fluidProperty = material.getProperty(PropertyKey.FLUID);
if (fluidProperty != null && fluidProperty.getFluid() == null) {
int temperature = Math.max(material.getBlastTemperature(), fluidProperty.getFluidTemperature());
Fluid fluid = registerFluid(material, fluidProperty.getFluidType(), temperature, fluidProperty.hasBlock());
fluidProperty.setFluid(fluid);
fluidProperty.setFluidTemperature(fluid.getTemperature(), fluid.getTemperature() >= 0);
}
PlasmaProperty plasmaProperty = material.getProperty(PropertyKey.PLASMA);
if (plasmaProperty != null && plasmaProperty.getPlasma() == null) {
int temperature = (fluidProperty == null ? 0 : fluidProperty.getFluidTemperature()) + 30000;
Fluid fluid = registerFluid(material, FluidTypes.PLASMA, temperature, false);
plasmaProperty.setPlasma(fluid);
}
}
}
Aggregations