Jump to content

ashtonr12

Members
  • Posts

    479
  • Joined

  • Last visited

Posts posted by ashtonr12

  1. ok so for 3) this is correct?

     

    @Override
    protected ResourceLocation func_110775_a(Entity entity) {
    return null;
    }
    

     

    and im still having trouble with one its not an error anymore but i cant get the texture to load i just get the purple and black square now, which means i am locating the texture wrong i think because otherwise it works fine.

    here is the new code, this may be wrong i have tried to update it according to the sources you showed me earlier;

     

    package ashtonsmod.common;
    
    import java.util.EnumSet;
    
    import net.minecraft.block.Block;
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.gui.GuiChat;
    import net.minecraft.client.gui.ScaledResolution;
    import net.minecraft.client.renderer.Tessellator;
    import net.minecraft.client.renderer.texture.TextureManager;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemStack;
    import net.minecraft.util.ResourceLocation;
    
    import org.lwjgl.opengl.GL11;
    
    import cpw.mods.fml.common.ITickHandler;
    import cpw.mods.fml.common.TickType;
    
    public class MiningHelmetOverlay implements ITickHandler
    {
    public static final ResourceLocation ICONS_PNG = new ResourceLocation("ashtonsmod:MiningHelmetOverlay");
        private static TextureManager textureManager =  Minecraft.getMinecraft().func_110434_K();
    
            @Override
            public void tickStart(EnumSet<TickType> type, Object... tickData){
            	
            }
    
            @Override
            public void tickEnd(EnumSet<TickType> type, Object... tickData)
            {
                    if(Minecraft.getMinecraft().thePlayer == null || Minecraft.getMinecraft().currentScreen != null)
                            return;
                   
                    ItemStack helmet = Minecraft.getMinecraft().thePlayer.inventory.armorItemInSlot(3);
                    if(Minecraft.getMinecraft().gameSettings.thirdPersonView == 0 && helmet != null && helmet.itemID == ashtonsmod.MinersHelmet.itemID)
                    {
                            GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
                           
                            Tessellator t = Tessellator.instance;
                           
                            ScaledResolution scale = new ScaledResolution(Minecraft.getMinecraft().gameSettings, Minecraft.getMinecraft().displayWidth, Minecraft.getMinecraft().displayHeight);
                            int width = scale.getScaledWidth();
                            int height = scale.getScaledHeight();
                           
                            GL11.glDisable(GL11.GL_DEPTH_TEST);
                            GL11.glDepthMask(false);
                            GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
                            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
                            GL11.glDisable(GL11.GL_ALPHA_TEST);
                        
                            textureManager.func_110577_a(ICONS_PNG);
                            
                            t.startDrawingQuads();
                            t.addVertexWithUV(0.0D, (double)height, 90.0D, 0.0D, 1.0D);
                            t.addVertexWithUV((double)width, (double)height, 90.0D, 1.0D, 1.0D);
                            t.addVertexWithUV((double)width, 0.0D, 90.0D, 1.0D, 0.0D);
                            t.addVertexWithUV(0.0D, 0.0D, 90.0D, 0.0D, 0.0D);
                            t.draw();
                           
                            GL11.glPopAttrib();
                    }
            }
    
            @Override
            public EnumSet<TickType> ticks()
            {
                    return EnumSet.of(TickType.RENDER);
            }
    
            @Override
            public String getLabel()
            {
                    return "render hud tick handler";
            }
    
    }
    
    

     

     

    my textures are locating the the src folder. i know lots of people confuse the path and such so incase i did that here is the path that the png's properties say it has "/Minecraft/src/assets/ashtonsmod/textures/overlays/MiningHelmetOverlay.png"

    i have tried this and a number of other locations in the "" where the texture location is meant to go, am i miles off or have i just made a stupid mistake somewhere???

     

    thanks for your time and patience guys :)

  2. i know that i am looking through all the ones that i can find, this thread is the ones that i cannot or have not yet found solutions to.

     

    There is only three things that i cant find how to update or what i have to change;

    1)

    GL11.glBindTexture(GL11.GL_TEXTURE_2D, Minecraft.getMinecraft().renderEngine.getTexture("%blur%/armor/DivingHelmetblur.png"));
    

    the error is under .gettexture and the error is that the method is undefined for texture manager

    2)

    this.loadTexture("/gui/items.png");
    

    the error is under this.loadTexture and the error is that the method is undefined for the type render (entityName)

    3)

    public class (entityName)
    

    the type (entityName) must implement the inherited abstract method Render.func_110775_a

     

    i don't know how to fix the first two and i cant find the answer and i have tried :P and still am, but i presume the third one means i am missing a functio to do with entities so i am going to start looking for that now, will update this if i find any fixes.

  3. one more texture related thing i need a hand with please :)

    i cant find the new correct function for this

     

    .renderEngine.getTexture("%blur%/armor/MiningHelmetblur.png")
    

     

    the error is under the .getTexture

  4. you could set the block to tick randomely, use that method but make it current light value +1 and thn make a chek so that when light value reaches 15 set to 0 or -1 instead or something.

  5. you could set the block to tick randomely, use that method but make it current light value +1 and thn make a chek so that when light value reaches 15 set to 0 or -1 instead or something.

  6. whats ASM?

     

    Also i reckon creating a custom renderer without techne as notch did it would be pretty solid as it is very long confusing and impossible to tell if it has been done correctly until you test it ingame. however this is just like making a chocoalte cake after your friend just bought you one in a box.

  7. whats ASM?

     

    Also i reckon creating a custom renderer without techne as notch did it would be pretty solid as it is very long confusing and impossible to tell if it has been done correctly until you test it ingame. however this is just like making a chocoalte cake after your friend just bought you one in a box.

  8. You are correct MateuszKam7 i did also think of this however this person seems rather new to modding so i thought i would show him the simplest method to his end. Also worldEdit is an ingame tool which he and his son could use in tandem as long as it is installed on both computers. Also MCEdit takes some time to learn whereas worldEdit just uses a very simple axe and other vanilla features ( +commands ).

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.