Hello, i recently got back into an old mod, after all that i was trying out stuff to make a custom Hud (Hud file is 512x512), and it just doesn't seem to be displaying
Is it something im doing wrong? id really like to know. Thank you for taking the time to read my thread
package com.ironmanremastered.ironman.armors;
import java.util.List;
import org.lwjgl.opengl.GL11;
import com.ironmanremastered.ironman.handlers.RemasterdStarkRulesHandler;
import com.ironmanremastered.ironman.main.ClientProxyRemastered;
import com.ironmanremastered.ironman.main.RemasteredReference;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
public class MarkIArmor extends TrueIronManArmorBlueprint {
public static final ResourceLocation texture = new ResourceLocation("textures/gui/hud/mark1hud.png");
private String[] armorTypes = { "neuropticsMarkI", "chassisMarkI", "legsMarkI", "bootsMarkI" };
private int tickcounter = 100;
public MarkIArmor(ItemArmor.ArmorMaterial material, int type)
{
super(material, 0, type);
}
@SideOnly(Side.CLIENT)
public void renderHelmetOverlay(ItemStack itemstack, EntityPlayer player, ScaledResolution resolution, float partialTicks, boolean hasScreen, int mouseX, int mouseY)
{
ItemStack neuroptics = player.getCurrentArmor(0);
ItemStack chassis = player.getCurrentArmor(1);
ItemStack legs = player.getCurrentArmor(2);
ItemStack boots = player.getCurrentArmor(3);
if ((neuroptics != null) && (neuroptics.getItem().equals(RemastererdArmorsRegistry.neuropticsMarkI)) && (chassis != null) && (chassis.getItem().equals(RemastererdArmorsRegistry.chassisMarkI)) && (legs != null) && (legs.getItem().equals(RemastererdArmorsRegistry.legsMarkI)) && (boots != null) && (boots.getItem().equals(RemastererdArmorsRegistry.bootsMarkI)))
{
if (!hasScreen)
{
if (RemasterdStarkRulesHandler.hud == true)
{
GL11.glEnable(3042);
GL11.glClearDepth(1.0D);
GL11.glDisable(2929);
GL11.glDisable(3008);
GL11.glDepthMask(false);
GL11.glBlendFunc(770, 771);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(0.0D, resolution.getScaledHeight(), 90.0D, 0.0D, 1.0D);
tessellator.addVertexWithUV(resolution.getScaledWidth(), resolution.getScaledHeight(), 90.0D, 1.0D, 1.0D);
tessellator.addVertexWithUV(resolution.getScaledWidth(), 0.0D, 90.0D, 1.0D, 0.0D);
tessellator.addVertexWithUV(0.0D, 0.0D, 90.0D, 0.0D, 0.0D);
tessellator.draw();
GL11.glDepthMask(true);
GL11.glEnable(2929);
GL11.glEnable(3008);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glDisable(3042);
}
}
else {}
}
}
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer)
{
if ((stack.getItem().equals(RemastererdArmorsRegistry.neuropticsMarkI) | stack.getItem().equals(RemastererdArmorsRegistry.chassisMarkI))) {
return "imr:textures/models/armor/Mark1_layer_1.png";
}
if ((stack.getItem().equals(RemastererdArmorsRegistry.legsMarkI) | stack.getItem().equals(RemastererdArmorsRegistry.bootsMarkI))) {
return "imr:textures/models/armor/Mark1_layer_2.png";
}
return null;
}
public void registerIcons(IIconRegister reg)
{
if (this == RemastererdArmorsRegistry.neuropticsMarkI) {
this.itemIcon = reg.registerIcon("imr:ironmanarmors/markIneuroptics");
}
if (this == RemastererdArmorsRegistry.chassisMarkI) {
this.itemIcon = reg.registerIcon("imr:ironmanarmors/markIchassis");
}
if (this == RemastererdArmorsRegistry.legsMarkI) {
this.itemIcon = reg.registerIcon("imr:ironmanarmors/markIlegs");
}
if (this == RemastererdArmorsRegistry.bootsMarkI) {
this.itemIcon = reg.registerIcon("imr:ironmanarmors/markIboots");
}
}
}