Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean RenderWall(Block block, int i, int j, int k, RenderBlocks renderblocks)
- {
- boolean flag = renderblocks.blockAccess.getBlockId(i, j, k - 1) == mod_EvilMinecraft.WallWood.blockID;
- boolean flag1 = renderblocks.blockAccess.getBlockId(i - 1, j, k) == mod_EvilMinecraft.WallWood.blockID;
- boolean flag2 = renderblocks.blockAccess.getBlockId(i + 1, j, k) == mod_EvilMinecraft.WallWood.blockID;
- boolean flag3 = renderblocks.blockAccess.getBlockId(i, j, k + 1) == mod_EvilMinecraft.WallWood.blockID;
- boolean flag4 = renderblocks.blockAccess.getBlockId(i, j, k - 1) == 0;
- boolean flag5 = renderblocks.blockAccess.getBlockId(i - 1, j, k) == 0;
- boolean flag6 = renderblocks.blockAccess.getBlockId(i + 1, j, k) == 0;
- boolean flag7 = renderblocks.blockAccess.getBlockId(i, j, k + 1) == 0;
- //Stuff for checking adjacent block pairs
- boolean matchingBlocksNS;
- boolean matchingBlocksEW;
- int northMetadata = renderblocks.blockAccess.getBlockMetadata(i, j, k + 1);
- int southMetadata = renderblocks.blockAccess.getBlockMetadata(i, j, k - 1);
- int eastMetadata = renderblocks.blockAccess.getBlockMetadata(i + 1, j, k);
- int westMetadata = renderblocks.blockAccess.getBlockMetadata(i - 1, j, k);
- //.................
- int l = renderblocks.blockAccess.getBlockMetadata(i, j, k);
- Tessellator tessellator = Tessellator.instance;
- tessellator.setBrightness(block.getMixedBrightnessForBlock(renderblocks.blockAccess, i, j, k));
- //Actual checking block pairs
- if(flag3 && northMetadata == l && flag && southMetadata == l)
- {
- matchingBlocksNS = true;
- }
- if(flag2 && eastMetadata == l && flag1 && westMetadata == l)
- {
- matchingBlocksEW = true;
- }
- if(matchingBlocksNS && !matchingBlocksEW)
- {
- //Render stuff for matching north and south blocks
- }
- if(!matchingBlocksNS && matchingBlocksEW)
- {
- //Render stuff for matching east and west blocks
- }
- //............................
- if(l == 0)
- {
- block.setBlockBounds(0.8F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
- renderblocks.overrideBlockTexture = -1;
- renderblocks.renderStandardBlock(block, i, j, k);
- block.setBlockBounds(0.8F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
- }
- if(l == 1)
- {
- block.setBlockBounds(0.0F, 0.0F, 0.8F, 1.0F, 1.0F, 1.0F);
- renderblocks.overrideBlockTexture = -1;
- renderblocks.renderStandardBlock(block, i, j, k);
- block.setBlockBounds(0.0F, 0.0F, 0.8F, 1.0F, 1.0F, 1.0F);
- }
- if(l == 2)
- {
- block.setBlockBounds(0.0F, 0.0F, 0.0F, 0.2F, 1.0F, 1.0F);
- renderblocks.overrideBlockTexture = -1;
- renderblocks.renderStandardBlock(block, i, j, k);
- block.setBlockBounds(0.0F, 0.0F, 0.0F, 0.2F, 1.0F, 1.0F);
- }
- if(l == 3)
- {
- block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.2F);
- renderblocks.overrideBlockTexture = -1;
- renderblocks.renderStandardBlock(block, i, j, k);
- block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.2F);
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement