Posted January 27, 201411 yr Hey guys. I've met a serious problem for me here. Well, i've created a 3d model of pistol. So its kinda item, but 3d rendered. It works fine, so its 3d rendered, but i dont know how to put textures on it. I tried out that code in my ItemRenderPistol file: Minecraft.getMinecraft().renderEngine.func_110577_a(new ResourceLocation ("testmod", "textures/models/blasterModelTexture.png")); It wants me to create a ResourceLocation class! I can create one, but what i have to type inside of that class, to make my textures appear on my 3D item? Can you help me, i really need this. Please give examples of code of your ResourceLocation if you can.
January 27, 201411 yr if you are on 1.6.4 you can use: ResourceLocation textures = (new ResourceLocation("name_modname:textures/items/texture.png")); Minecraft.getMinecraft().renderEngine.bindTexture(textures); in your renderer. I think thats what you're after...
January 27, 201411 yr Author if you are on 1.6.4 you can use: ResourceLocation textures = (new ResourceLocation("name_modname:textures/items/texture.png")); Minecraft.getMinecraft().renderEngine.bindTexture(textures); in your renderer. I think thats what you're after... bindTexture is not working ofcourse. It says that i have to change method bindTexture(String) to bindTexture(ResourceLocation) Also i use 1.5.2 ver
January 27, 201411 yr Author if you are on 1.6.4 you can use: ResourceLocation textures = (new ResourceLocation("name_modname:textures/items/texture.png")); Minecraft.getMinecraft().renderEngine.bindTexture(textures); in your renderer. I think thats what you're after... You also havent answered on another part of my question. Am i suppose to create ResourceLocation file, and if i suppose, what i have to type in ResourceLocation file?
January 27, 201411 yr I have the exact code i put above running right now, in an entity renderer calling a model class, renderTileEntityAt method: GL11.glPushMatrix(); GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); ResourceLocation textures = (new ResourceLocation("skullywag_spawnCrystalsProto:textures/blocks/Crystal.png")); Minecraft.getMinecraft().renderEngine.bindTexture(textures); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); this.model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); It works fine, no class for the resource location.
January 27, 201411 yr Author I have the exact code i put above running right now, in an entity renderer calling a model class, renderTileEntityAt method: GL11.glPushMatrix(); GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); ResourceLocation textures = (new ResourceLocation("skullywag_spawnCrystalsProto:textures/blocks/Crystal.png")); Minecraft.getMinecraft().renderEngine.bindTexture(textures); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); this.model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); It works fine, no class for the resource location.
January 28, 201411 yr Hi ResourceLocation is in package net.minecraft.util; no idea why you can't import it. -TGG
January 28, 201411 yr Author Hi ResourceLocation is in package net.minecraft.util; I also tried to find other ResourceLocation files, there is no such file. Althrought i'm using minecraft 1.5.2. no idea why you can't import it. -TGG The import net.minecraft.util.ResourceLocation cannot be resolved Dont really know what to do..
January 28, 201411 yr Try some of these? http://blog.sherifmansour.com/?p=207 Reinstall forge....? -TGG
January 28, 201411 yr Where there ResourceLocation in Minecraft 1.5.2? I'm getting confused with all the updates... Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
January 28, 201411 yr Author Try some of these? http://blog.sherifmansour.com/?p=207 Reinstall forge....? -TGG I tried some of those. Not worked. Have you got ResourceLocation file? Please send me a code inside of it, ill create a new one.
January 28, 201411 yr Where there ResourceLocations in Minecraft 1.5.2? I'm getting confused with all the updates... ResourceLocation was introduced in 1.6. I knew it!!! Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.