Social Icons

Saturday, 5 May 2012

Opacity Xray and FullBright {code}

This assumes that you know all triggers

so lets start assuming that you setup all your triggers etc
note Fe = Fullbright Xe= Xray
Find = ctrl + f


_____________Part 1 __________________________

Open Tesselator.java in eclipse

add
public static int opacity = 90;
note the number 90 is customizable to your preference
to
public class Tessellator
{
find
public void setColorOpaque(int i, int j, int k)
and add
if(GuiIngame.Xe)
{
setColorRGBA(i, j, k, opacity);
}
to it

Get to
Block.java

find
public int getRenderBlockPass()
and change

return 0; ===> return 1

_________________Part 1 Done________________

And you should have something like

This

____________________Part 2____________________
Getting the Xray!

Go back to
public int getRenderBlockPass()
and this time label the blocks that you want like this
if(GuiIngame.Xe)
{
return blockID == 14 || blockID == 15 || blockID == 16 || blockID == 21 || blockID == 54 || blockID == 54? 0:1 ;

}
else
return 0;
IMP BLOCK IDS

here


Then go to
RenderBlocks.java
and find
public boolean renderBlockByRenderType(Block block, int i, int j, int k)
and place your block ids like
int l = block.getRenderType();
block.setBlockBoundsBasedOnState(blockAccess, i, j, k);
if(GuiIngame.Xe)
{
renderAllFaces = block.blockID == 14 || block.blockID == 15 || block.blockID == 16 || block.blockID == 56 || block.blockID == 21 || block.blockID == 54;
}
__________________________________Part 2 done______________________

IT should be something like this

this




_______________________________________Part 3__________________________
The full Bright


In blocks.java
find
public float getBlockBrightness(IBlockAccess iblockaccess, int i, int j, int k)
and replace to something like
if(GuiIngame.Xe || GuiIngame.Fe)
{
return 1000f;
}else
return iblockaccess.getBrightness(i, j, k, lightValue[blockID]);
}
Fe is Fullbright.

then underneath it is
public int getMixedBrightnessForBlock(IBlockAccess iblockaccess, int i, int j, int k)
change it to
if(GuiIngame.Xe || GuiIngame.Fe)
{
return 1000;
}else
return iblockaccess.getLightBrightnessForSkyBlocks(i, j, k, lightValue[blockID]);

No comments:

Post a Comment