From 74eae2dd636df6d4b269139fca0c8c61d88130af Mon Sep 17 00:00:00 2001 From: Maya <10861407+serenibyss@users.noreply.github.com> Date: Sun, 19 Jan 2025 12:44:22 -0700 Subject: [PATCH] Retexture Weed Picker (#87) Co-authored-by: BlueHero233 <87818077+BlueHero233@users.noreply.github.com> --- .../GTHandler/machines/CropWeedPicker.java | 19 +++++++++++++----- .../textures/blocks/OVERLAY_WEED_PICKER.png | Bin 0 -> 672 bytes 2 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 src/main/resources/assets/bpp/textures/blocks/OVERLAY_WEED_PICKER.png diff --git a/src/main/java/com/github/bartimaeusnek/cropspp/GTHandler/machines/CropWeedPicker.java b/src/main/java/com/github/bartimaeusnek/cropspp/GTHandler/machines/CropWeedPicker.java index efd3286..dc2e6d8 100644 --- a/src/main/java/com/github/bartimaeusnek/cropspp/GTHandler/machines/CropWeedPicker.java +++ b/src/main/java/com/github/bartimaeusnek/cropspp/GTHandler/machines/CropWeedPicker.java @@ -2,6 +2,7 @@ import static gregtech.api.enums.GTValues.V; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -15,6 +16,8 @@ import com.gtnewhorizons.modularui.common.widget.SlotWidget; import com.gtnewhorizons.modularui.common.widget.TextWidget; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Materials; import gregtech.api.enums.Textures; import gregtech.api.gui.modularui.GTUIInfos; @@ -30,6 +33,8 @@ public class CropWeedPicker extends MTEHatch { + private static ITexture OVERLAY; + public CropWeedPicker(int aID, String aName, String aNameRegional, int aTier) { super( aID, @@ -242,13 +247,20 @@ public int getTankPressure() { return 100; } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister aBlockIconRegister) { + super.registerIcons(aBlockIconRegister); + OVERLAY = TextureFactory.of(new Textures.BlockIcons.CustomIcon("bpp:OVERLAY_WEED_PICKER")); + } + @Override public ITexture[] getTexture(IGregTechTileEntity baseMetaTileEntity, ForgeDirection side, ForgeDirection facing, int colorIndex, boolean active, boolean redstoneLevel) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][colorIndex + 1], (side == ForgeDirection.DOWN || side == ForgeDirection.UP) ? TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) - : TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP) }; + : OVERLAY }; } @Override @@ -258,10 +270,7 @@ public ITexture[] getTexturesActive(ITexture aBaseTexture) { @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] { TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), - TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), - TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), - TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), }; + return new ITexture[] { OVERLAY, OVERLAY, OVERLAY, OVERLAY }; } @Override diff --git a/src/main/resources/assets/bpp/textures/blocks/OVERLAY_WEED_PICKER.png b/src/main/resources/assets/bpp/textures/blocks/OVERLAY_WEED_PICKER.png new file mode 100644 index 0000000000000000000000000000000000000000..8d311936c6c744e29842cfdaa319996a43010c3e GIT binary patch literal 672 zcmV;R0$=@!P)EX>4Tx04R}tkv&MmKpe$iQ>9ue4ptBm$xxjvh>AFtDi*;)X)CnqU~=gfG-*gu zTpR`0f`cE6RRrkxtGN2Z_Z(2g@DIiiS!&LmX06jq-(z z!wTmu&T6^JTKD8H4CJ(x6xV5vAciHxk$?ypRg_SMg)preDJGJ%A9e8$H~k56$>b`5 zkz)ZBsF0d|@IUz7t(l*ma*_g3p!>zPKgIyxF3_mi_V=-EH%S