Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retexture Weed Picker #87

Merged
merged 3 commits into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.