Normal:
EDIT: The relevant code:
in mod_SVJuice:
Code: Select all
@Override
public boolean renderWorldBlock(RenderBlocks renderblocks, IBlockAccess world, int x, int y, int z, Block block, int renderID) {
if (renderID == blockJuiceContainerRenderID)
return renderBlockJuiceContainerWorld(world, (SVBlockJuiceContainer) block, x, y, z, renderblocks);
else if (renderID == blockJuiceMakerRenderID)
return renderBlockJuiceMakerWorld(world, (SVBlockJuiceMaker) block, x, y, z, renderblocks);
return false;
}
private boolean renderBlockJuiceMakerWorld(IBlockAccess world, SVBlockJuiceMaker block, int x, int y, int z, RenderBlocks renderblocks) {
int tex = -1;
tex = Block.stone.blockIndexInTexture;
SVRenderHelper.renderWorldWalls(renderblocks, block, x, y, z, 0F, block.floor, 0.5F - block.hole / 2, tex);
tex = Block.planks.blockIndexInTexture;
SVRenderHelper.renderWorldWalls(renderblocks, block, x, y, z, block.floor, 1F, block.wall, tex);
tex = Block.fenceIron.blockIndexInTexture;
SVRenderHelper.renderWorldCube(renderblocks, block, x, y, z, block.wall, block.floor + 0.05F, block.wall, 1F - block.wall,
block.floor + 0.1F, 1F - block.wall, tex);
return true;
}
Code: Select all
public static void renderWorldCube(RenderBlocks renderblocks, Block block, int x, int y, int z, float minx, float miny, float minz, float maxx,
float maxy, float maxz, int tex) {
renderblocks.overrideBlockTexture = tex;
block.setBlockBounds(minx, miny, minz, maxx, maxy, maxz);
renderblocks.renderStandardBlock(block, x, y, z);
renderblocks.overrideBlockTexture = -1;
}
public static void renderWorldWalls(RenderBlocks renderblocks, Block block, int x, int y, int z, float bottom, float top, float thick, int tex) {
renderWorldCube(renderblocks, block, x, y, z, 0F, bottom, 0F, thick, top, 1F, tex);
renderWorldCube(renderblocks, block, x, y, z, 1F - thick, bottom, 0F, 1F, top, 1F, tex);
renderWorldCube(renderblocks, block, x, y, z, thick, bottom, 0F, 1F - thick, top, thick, tex);
renderWorldCube(renderblocks, block, x, y, z, thick, bottom, 1F - thick, 1F - thick, top, 1F, tex);
}