Posted October 15, 201212 yr Hello, i am making a mod that adds an new type of obsidian, obsidiand (I'm still working on the name) it's sand from obzidian and therefore it has gravity, so I let it extend BlockSand and I do the usual stuff and it works. But whenever it falls the texture changes to the equivaltent texture from terrain.png, after some searching I found the spot I have to edit: in RenderFallingSand.java is this line : public void doRenderFallingSand(EntityFallingSand par1EntityFallingSand, double par2, double par4, double par6, float par8, float par9) { GL11.glPushMatrix(); GL11.glTranslatef((float)par2, (float)par4, (float)par6); this.loadTexture("/terrain.png"); Block var10 = Block.blocksList[par1EntityFallingSand.blockID]; World var11 = par1EntityFallingSand.getWorld(); GL11.glDisable(GL11.GL_LIGHTING); if (var10 == Block.dragonEgg) { this.renderBlocks.blockAccess = var11; Tessellator var12 = Tessellator.instance; var12.startDrawingQuads(); var12.setTranslation((double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posX)) - 0.5F), (double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posY)) - 0.5F), (double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posZ)) - 0.5F)); this.renderBlocks.renderBlockByRenderType(var10, MathHelper.floor_double(par1EntityFallingSand.posX), MathHelper.floor_double(par1EntityFallingSand.posY), MathHelper.floor_double(par1EntityFallingSand.posZ)); var12.setTranslation(0.0D, 0.0D, 0.0D); var12.draw(); } else if (var10 != null) { this.renderBlocks.func_78588_a(var10, var11, MathHelper.floor_double(par1EntityFallingSand.posX), MathHelper.floor_double(par1EntityFallingSand.posY), MathHelper.floor_double(par1EntityFallingSand.posZ), par1EntityFallingSand.field_70285_b); } GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); } so I thought I would just make an RenderFallingObsidiand wich extends RenderFallingSand and override the texture. But I can't find the place in the code where Minecraft decides which renderer to use. I have been stuck with this for days and i can't find a solution.
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.