From b1ac2dc90ec6847e5a328fb12a3ece3b670df33c Mon Sep 17 00:00:00 2001 From: Léa Gris Date: Thu, 1 Sep 2022 13:17:27 +0200 Subject: impl(covers): functional covers uses machine casing (#1317) * impl(covers): functional covers uses machine casing - Functional covers now will let see the casing, when placed on machines. - When placed on pipes or frames, they continue to use their own tiered casing as they used to. * impr(cover): restore backward compat interface to cover registgration Registering covers with the old interface works again. Legacy cover registration just produce covers that renders the old way without transparency over machine casing. Removed the useless GT_Cover_Cased class and added the feature to the GT_CoverBehavior class, maintaining the old constructor alongside the new constructor with an overlay texture. * impr(covers): deprecate old constructors Delete totally redundant and unused EnergyOnly cover Keeps other unused covers as TODO reimplementation tasks * impr(covers): fludStorageMonitor overlay - Re-add FluidStorageMonitor fluid-texture overlay - Allow light-emitting fluids to render as glow texture. * impr(covers): Expand foreground texture support to GT_Cover_FacadeBase * spotlessapply --- src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/java/gregtech/loaders/oreprocessing') diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java index 2c8c2587e5..943d711d59 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java @@ -5,6 +5,7 @@ import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; import net.minecraft.item.ItemStack; @@ -46,12 +47,12 @@ public class ProcessingLens implements gregtech.api.interfaces.IOreRecipeRegistr GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 2L), 2400, 30); + final ITexture lensCoverTexture = + TextureFactory.of(Textures.BlockIcons.OVERLAY_LENS, aMaterial.mRGBa, false); GregTech_API.registerCover( aStack, - TextureFactory.of( - Textures.BlockIcons.MACHINE_CASINGS[2][0], - TextureFactory.of(Textures.BlockIcons.OVERLAY_LENS, aMaterial.mRGBa, false)), - new gregtech.common.covers.GT_Cover_Lens(aMaterial.mColor.mIndex)); + TextureFactory.of(Textures.BlockIcons.MACHINE_CASINGS[2][0], lensCoverTexture), + new gregtech.common.covers.GT_Cover_Lens(aMaterial.mColor.mIndex, lensCoverTexture)); } } } -- cgit