Jump to content

ashtonr12

Members
  • Posts

    479
  • Joined

  • Last visited

Everything posted by ashtonr12

  1. cool, ill look at that in a se update i fixed the mining helmet overlay texture location thingy, i had the wrong path
  2. 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
  3. ok, i think i fixed no.1 but i have to fix the others before i can check whether it worked or not
  4. thanks i will look at that stuff
  5. ok, i will keep looking and i am learning basic java but i cant learn it all in a day thanks for the help.
  6. you need to be more specific, how have you tried to add the texture, provide your sample code so we can see any errors and what do you mean by icon?
  7. 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 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.
  8. 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
  9. Thankyou exactly what i needed
  10. i started to update my mod a bit late and cant find the new way to do textures can someone tell me how ? or link me to a previous thread that i missed please?
  11. that is in the vanilla class that i am extending and i am NOT editing vanilla classes, thats why i asked how to override it.
  12. that is in the vanilla class that i am extending and i am NOT editing vanilla classes, thats why i asked how to override it.
  13. 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.
  14. 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.
  15. i have to extend block pane to use its renderer and other methods
  16. i have to extend block pane to use its renderer and other methods
  17. Mazetar, thats what i meant but yours was less fancy
  18. Mazetar, thats what i meant but yours was less fancy
  19. so show him what you have so far, how you have come to this decision and why you don't think it works. he can then extend your knowledge of the method and give you a greater understanding of it.
  20. so show him what you have so far, how you have come to this decision and why you don't think it works. he can then extend your knowledge of the method and give you a greater understanding of it.
  21. 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.
  22. 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.
  23. it should be in the mod owners mcmod info file, or in the main mod class under modid = "MODID", alternatively if you do not have access to either of these you would have to ask thr mod creator.
  24. it should be in the mod owners mcmod info file, or in the main mod class under modid = "MODID", alternatively if you do not have access to either of these you would have to ask thr mod creator.
  25. 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.