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 0000000..8d31193 Binary files /dev/null and b/src/main/resources/assets/bpp/textures/blocks/OVERLAY_WEED_PICKER.png differ