I just made a CustomBlockRenderer(ISimpleBlockRenderingHandler),beacos i want to make somting like vine,but it will be not based on metadata,but on the is there block or no.From my tryes,i did rendering just of 2 sides(Z pos and neg).But now,when i did add X pos and neg,it just dont want to work...just dont rendering them...at all...My render code:
public class LightRenderer implements ISimpleBlockRenderingHandler {
@Override
public void renderInventoryBlock(Block block, int metadata, int modelID,
RenderBlocks renderer) {
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,Block block, int modelId, RenderBlocks r) {
float f19 = 0.1F;
Tessellator tessellator = Tessellator.instance;
// if (world.getBlockId(x+1, y, z)!=0) {
tessellator.addTranslation(f19, 0.0F,0.0F);
r.renderFaceXNeg(block, (double)x, (double)y, (double)z, r.getBlockIcon(block, r.blockAccess, x, y, z, 0));
r.renderFaceXPos(block, (double)x, (double)y, (double)z, r.getBlockIcon(block, r.blockAccess, x, y, z, 0));
tessellator.addTranslation(-f19, 0.0F,0.0F);
// }
// if (world.getBlockId(x-1, y, z)!=0) {
tessellator.addTranslation(-f19+1, 0.0F,0.0F);
r.renderFaceXNeg(block, (double)x, (double)y, (double)z, r.getBlockIcon(block, r.blockAccess, x, y, z, 0));
r.renderFaceXPos(block, (double)x, (double)y, (double)z, r.getBlockIcon(block, r.blockAccess, x, y, z, 0));
tessellator.addTranslation(f19-1, 0.0F,0.0F);
// }
// if (world.getBlockId(x, y, z-1)!=0) {
tessellator.addTranslation(0.0f, 0.0f,f19);
r.renderFaceZPos(block, (double)x, (double)y, (double)z, r.getBlockIcon(block, r.blockAccess, x, y, z, 0));
r.renderFaceZNeg(block, (double)x, (double)y, (double)z, r.getBlockIcon(block, r.blockAccess, x, y, z, 0));
tessellator.addTranslation(0.0f, 0.0f,-f19);
// }
// if (world.getBlockId(x, y, z+1)!=0) {
tessellator.addTranslation(0.0f, 0.0f,-f19+1);
r.renderFaceZPos(block, (double)x, (double)y, (double)z, r.getBlockIcon(block, r.blockAccess, x, y, z, 0));
r.renderFaceZNeg(block, (double)x, (double)y, (double)z, r.getBlockIcon(block, r.blockAccess, x, y, z, 0));
tessellator.addTranslation(0.0f, 0.0f,f19-1);
// }
return true;
}
@Override
public boolean shouldRender3DInInventory() {
return false;
}
@Override
public int getRenderId() {
return ClientProxy.LightRenderID;
}
}
All other code works fine(its registrading kk,and works all fine),but the render X pos+neg...its just dont wont to work...