d3thdrug Posted July 30, 2013 Posted July 30, 2013 hi guys im having texture problems with 2 things if someone can help me with at least one that would be great but you help with both the would be really great.. 1) my custom rendered block works perfect but it cant find the texture for it can someone show me how its supposed to be done? my blockRender file: public class PlushRender extends TileEntitySpecialRenderer { private static final ResourceLocation field_110782_f = new ResourceLocation("/ihulm/textures/misc/blockplush.png"); public PlushRender() { aModel = new ModelPlush(); } public void renderAModelAt(TileEntityPlush tileentity1, double d, double d1, double d2, float f) { GL11.glPushMatrix(); GL11.glTranslatef((float)d + 0.5F, (float)d1 + 1.52F, (float)d2 + 0.5F); GL11.glRotatef(180F, 0F, 0F, 1F); GL11.glPushMatrix(); aModel.renderModel(0.0625F); GL11.glPopMatrix(); GL11.glPopMatrix(); } protected ResourceLocation func_110781_a(BlockPlush BlockMirror) { return field_110782_f; } protected ResourceLocation func_110775_a(Block par1Entity) { return this.func_110781_a((BlockPlush)par1Entity); } public void renderTileEntityAt(TileEntity tileentity, double d, double d1, double d2, float f) { renderAModelAt((TileEntityPlush)tileentity, d, d1, d2, f); } private ModelPlush aModel; } 2) my new armor is working fine but i dont know how to direct the icon texture for it and the material texture for it can someone please help? Quote
GotoLink Posted July 31, 2013 Posted July 31, 2013 The ResourceLocation thing has been explained like, every day since 1.6 release. You can do a search for it can't you ? Hint: changing the string arg should do. Why do you use obfuscated names for your own fields and methods ? Quote
Moritz Posted July 31, 2013 Posted July 31, 2013 First when you show code than make [code] [/code] public class PlushRender extends TileEntitySpecialRenderer { private static final ResourceLocation field_110782_f = new ResourceLocation("/ihulm/textures/misc/blockplush.png"); public PlushRender() { aModel = new ModelPlush(); } public void renderAModelAt(TileEntityPlush tileentity1, double d, double d1, double d2, float f) { GL11.glPushMatrix(); GL11.glTranslatef((float)d + 0.5F, (float)d1 + 1.52F, (float)d2 + 0.5F); GL11.glRotatef(180F, 0F, 0F, 1F); GL11.glPushMatrix(); aModel.renderModel(0.0625F); GL11.glPopMatrix(); GL11.glPopMatrix(); } protected ResourceLocation func_110781_a(BlockPlush BlockMirror) { return field_110782_f; } protected ResourceLocation func_110775_a(Block par1Entity) { return this.func_110781_a((BlockPlush)par1Entity); } public void renderTileEntityAt(TileEntity tileentity, double d, double d1, double d2, float f) { renderAModelAt((TileEntityPlush)tileentity, d, d1, d2, f); } private ModelPlush aModel; } first delete this functions, their not needed!: protected ResourceLocation func_110781_a(BlockPlush BlockMirror) { return field_110782_f; } protected ResourceLocation func_110775_a(Block par1Entity) { return this.func_110781_a((BlockPlush)par1Entity); } than change the string of your Texture to this: private static final ResourceLocation field_110782_f = new ResourceLocation("ihulm:textures/misc/blockplush.png"); and finally add this to your renderAModelAt function: this.func_110628_a(field_110782_f); Then everything should work^^ . i hope it helps^^ Quote
d3thdrug Posted July 31, 2013 Author Posted July 31, 2013 First when you show code than make [code] [/code] public class PlushRender extends TileEntitySpecialRenderer { private static final ResourceLocation field_110782_f = new ResourceLocation("/ihulm/textures/misc/blockplush.png"); public PlushRender() { aModel = new ModelPlush(); } public void renderAModelAt(TileEntityPlush tileentity1, double d, double d1, double d2, float f) { GL11.glPushMatrix(); GL11.glTranslatef((float)d + 0.5F, (float)d1 + 1.52F, (float)d2 + 0.5F); GL11.glRotatef(180F, 0F, 0F, 1F); GL11.glPushMatrix(); aModel.renderModel(0.0625F); GL11.glPopMatrix(); GL11.glPopMatrix(); } protected ResourceLocation func_110781_a(BlockPlush BlockMirror) { return field_110782_f; } protected ResourceLocation func_110775_a(Block par1Entity) { return this.func_110781_a((BlockPlush)par1Entity); } public void renderTileEntityAt(TileEntity tileentity, double d, double d1, double d2, float f) { renderAModelAt((TileEntityPlush)tileentity, d, d1, d2, f); } private ModelPlush aModel; } first delete this functions, their not needed!: protected ResourceLocation func_110781_a(BlockPlush BlockMirror) { return field_110782_f; } protected ResourceLocation func_110775_a(Block par1Entity) { return this.func_110781_a((BlockPlush)par1Entity); } than change the string of your Texture to this: private static final ResourceLocation field_110782_f = new ResourceLocation("ihulm:textures/misc/blockplush.png"); and finally add this to your renderAModelAt function: this.func_110628_a(field_110782_f); Then everything should work^^ . i hope it helps^^ yay.... but if you keep one plushBlock there then theres no texture but if you place 2 then one of them has the the texture correctly and if you place a bunch of them only one will not have the texture, but if you brake the one with no texture a different one loses the texture Quote
Recommended Posts
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.