Java Code Examples for net.minecraft.block.Block#getLightOpacity()
The following examples show how to use
net.minecraft.block.Block#getLightOpacity() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ForgeQueue_All.java From FastAsyncWorldedit with GNU General Public License v3.0 | 5 votes |
@Override public int getOpacity(ExtendedBlockStorage section, int x, int y, int z) { int combined = getCombinedId4Data(section, x, y, z); if (combined == 0) { return 0; } Block block = Block.getBlockById(FaweCache.getId(combined)); return block.getLightOpacity(); }
Example 2
Source File: ForgeQueue_All.java From FastAsyncWorldedit with GNU General Public License v3.0 | 5 votes |
@Override public int getOpacity(ExtendedBlockStorage section, int x, int y, int z) { int combined = getCombinedId4Data(section, x, y, z); if (combined == 0) { return 0; } Block block = Block.getBlockById(FaweCache.getId(combined)); return block.getLightOpacity(); }
Example 3
Source File: TileEntityNewBeacon.java From Et-Futurum with The Unlicense | 4 votes |
private void updateSegments() { int x = xCoord; int y = yCoord; int z = zCoord; segments.clear(); TileEntityNewBeacon.BeamSegment beamsegment = new TileEntityNewBeacon.BeamSegment(EntitySheep.fleeceColorTable[0]); segments.add(beamsegment); boolean flag = true; for (int i = y + 1; i < worldObj.getActualHeight(); i++) { Block iblockstate = worldObj.getBlock(x, i, z); float[] colours; if (iblockstate == Blocks.stained_glass) colours = EntitySheep.fleeceColorTable[worldObj.getBlockMetadata(x, i, z)]; else { if (iblockstate != Blocks.stained_glass_pane) { if (iblockstate.getLightOpacity() >= 15) { segments.clear(); break; } beamsegment.func_177262_a(); continue; } colours = EntitySheep.fleeceColorTable[worldObj.getBlockMetadata(x, i, z)]; } if (!flag) colours = new float[] { (beamsegment.func_177263_b()[0] + colours[0]) / 2.0F, (beamsegment.func_177263_b()[1] + colours[1]) / 2.0F, (beamsegment.func_177263_b()[2] + colours[2]) / 2.0F }; if (Arrays.equals(colours, beamsegment.func_177263_b())) beamsegment.func_177262_a(); else { beamsegment = new TileEntityNewBeacon.BeamSegment(colours); segments.add(beamsegment); } flag = false; } }