Posted October 16, 201212 yr In my chert craft mod I have a chert sand block that extends the sand block. I am using the unlimited texture file. I don't have internet on the computer im using, so can't post code. Everything works fine, except that when it falls it changes to the wood texture. There's no extra code, just a block that extends sand then code for the drop when destroyed and code for texture file. How do i make it the chert sand texture when falling? And not the wood. It works fine on the ML version.
October 16, 201212 yr Thats like almost exactly my problem, I have searched the code and have found that when the "sand" falls an entity is spawned which is called EntityFallingSand and that entity has a renderer which is called RenderFallingSand. In RenderFallingSand there is a line where it loads the normal terrain.png and it combines that with the (yourblock = new BlockYour(230, 0).setStepSound(Block.soundStoneFootstep).setHardness(3F).setResistance(1.0F).setBlockName("Yourblock") number of the texture in the spreadsheet (where I assume you use one). The problem is obviously that the renderer uses the wrong .png, I have tried to make some sort of extend of RenderFallingSand where I overwrite the path to the texture but I have had no success because when I make such a Renderer I can't find a way to choose that renderer for my falling entity over the normal RenderFallingSand. I have started modding minecraft and coding java only a few days ago so I can't give you a solution, but at least you know what the problem (problably) is. If you find a solution for this problem please inform me about it, it has been busting my head. (Also I recommend calling this topic entity texture while falling, for it is an entity and not an item.)
October 25, 201212 yr Author Thats like almost exactly my problem, I have searched the code and have found that when the "sand" falls an entity is spawned which is called EntityFallingSand and that entity has a renderer which is called RenderFallingSand. In RenderFallingSand there is a line where it loads the normal terrain.png and it combines that with the (yourblock = new BlockYour(230, 0).setStepSound(Block.soundStoneFootstep).setHardness(3F).setResistance(1.0F).setBlockName("Yourblock") number of the texture in the spreadsheet (where I assume you use one). The problem is obviously that the renderer uses the wrong .png, I have tried to make some sort of extend of RenderFallingSand where I overwrite the path to the texture but I have had no success because when I make such a Renderer I can't find a way to choose that renderer for my falling entity over the normal RenderFallingSand. I have started modding minecraft and coding java only a few days ago so I can't give you a solution, but at least you know what the problem (problably) is. If you find a solution for this problem please inform me about it, it has been busting my head. (Also I recommend calling this topic entity texture while falling, for it is an entity and not an item.) Thanks for the help. I'll be working on this when I get home from work today.
October 25, 201212 yr In order to get your custom render called, you must register it with RenderingRegistry. In your client proxy/client side onLoad code: RenderingRegistry.registerEntityRenderingHandler(render_name_here.class, new EntityToBeRendered());
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.