Skip to content

Commit

Permalink
Retexture Weed Picker (#87)
Browse files Browse the repository at this point in the history
Co-authored-by: BlueHero233 <[email protected]>
  • Loading branch information
serenibyss and BlueHero233 authored Jan 19, 2025
1 parent 830752a commit 74eae2d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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,
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 74eae2d

Please sign in to comment.