Jump to content

[1.6.2] help with textures: armor textures and custom rendered block textures


d3thdrug

Recommended Posts

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?

Link to comment
Share on other sites

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^^

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

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