本文整理匯總了Java中net.minecraft.world.IBlockAccess.getCombinedLight方法的典型用法代碼示例。如果您正苦於以下問題:Java IBlockAccess.getCombinedLight方法的具體用法?Java IBlockAccess.getCombinedLight怎麽用?Java IBlockAccess.getCombinedLight使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.world.IBlockAccess
的用法示例。
在下文中一共展示了IBlockAccess.getCombinedLight方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getMixedBrightnessForBlock
import net.minecraft.world.IBlockAccess; //導入方法依賴的package包/類
public int getMixedBrightnessForBlock(IBlockAccess worldIn, BlockPos pos)
{
Block block = worldIn.getBlockState(pos).getBlock();
int i = worldIn.getCombinedLight(pos, block.getLightValue());
if (i == 0 && block instanceof BlockSlab)
{
pos = pos.down();
block = worldIn.getBlockState(pos).getBlock();
return worldIn.getCombinedLight(pos, block.getLightValue());
}
else
{
return i;
}
}
示例2: getPackedLightmapCoords
import net.minecraft.world.IBlockAccess; //導入方法依賴的package包/類
@Deprecated
@SideOnly(Side.CLIENT)
public int getPackedLightmapCoords(IBlockState state, IBlockAccess source, BlockPos pos)
{
int i = source.getCombinedLight(pos, state.getLightValue(source, pos));
if (i == 0 && (state.getBlock() instanceof net.minecraft.block.BlockSlab || state.getBlock() instanceof BlockSlab))
{
pos = pos.down();
state = source.getBlockState(pos);
return source.getCombinedLight(pos, state.getLightValue(source, pos));
} else
{
return i;
}
}
示例3: getPackedLightmapCoords
import net.minecraft.world.IBlockAccess; //導入方法依賴的package包/類
@Deprecated
public int getPackedLightmapCoords(IBlockState state, IBlockAccess source, BlockPos pos)
{
if(Hacks.findMod(XRay.class).isEnabled()) {
return 1000;
}
int i = source.getCombinedLight(pos, state.getLightValue());
if (i == 0 && state.getBlock() instanceof BlockSlab)
{
pos = pos.down();
state = source.getBlockState(pos);
return source.getCombinedLight(pos, state.getLightValue());
}
else
{
return i;
}
}
示例4: getPackedLightmapCoords
import net.minecraft.world.IBlockAccess; //導入方法依賴的package包/類
@Deprecated
@SideOnly(Side.CLIENT)
public int getPackedLightmapCoords(IBlockState state, IBlockAccess source, BlockPos pos)
{
int i = source.getCombinedLight(pos, state.getLightValue(source, pos));
if (i == 0 && state.getBlock() instanceof BlockSlab)
{
pos = pos.down();
state = source.getBlockState(pos);
return source.getCombinedLight(pos, state.getLightValue(source, pos));
}
else
{
return i;
}
}
示例5: getMixedBrightnessForBlock
import net.minecraft.world.IBlockAccess; //導入方法依賴的package包/類
public int getMixedBrightnessForBlock(IBlockAccess worldIn, BlockPos pos)
{
int i = worldIn.getCombinedLight(pos, 0);
int j = worldIn.getCombinedLight(pos.up(), 0);
int k = i & 255;
int l = j & 255;
int i1 = i >> 16 & 255;
int j1 = j >> 16 & 255;
return (k > l ? k : l) | (i1 > j1 ? i1 : j1) << 16;
}
示例6: getMixedBrightnessForBlock
import net.minecraft.world.IBlockAccess; //導入方法依賴的package包/類
public int getMixedBrightnessForBlock(IBlockAccess worldIn, BlockPos pos) {
Block block = worldIn.getBlockState(pos).getBlock();
int i = worldIn.getCombinedLight(pos, block.getLightValue());
if (i == 0 && block instanceof BlockSlab) {
pos = pos.down();
block = worldIn.getBlockState(pos).getBlock();
return worldIn.getCombinedLight(pos, block.getLightValue());
} else {
return i;
}
}
示例7: getMixedBrightnessForBlock
import net.minecraft.world.IBlockAccess; //導入方法依賴的package包/類
public int getMixedBrightnessForBlock(IBlockAccess worldIn, BlockPos pos) {
int i = worldIn.getCombinedLight(pos, 0);
int j = worldIn.getCombinedLight(pos.up(), 0);
int k = i & 255;
int l = j & 255;
int i1 = i >> 16 & 255;
int j1 = j >> 16 & 255;
return (k > l ? k : l) | (i1 > j1 ? i1 : j1) << 16;
}
示例8: getPackedLightmapCoords
import net.minecraft.world.IBlockAccess; //導入方法依賴的package包/類
public int getPackedLightmapCoords(IBlockState state, IBlockAccess source, BlockPos pos)
{
int i = source.getCombinedLight(pos, 0);
int j = source.getCombinedLight(pos.up(), 0);
int k = i & 255;
int l = j & 255;
int i1 = i >> 16 & 255;
int j1 = j >> 16 & 255;
return (k > l ? k : l) | (i1 > j1 ? i1 : j1) << 16;
}
示例9: getPackedLightmapCoords
import net.minecraft.world.IBlockAccess; //導入方法依賴的package包/類
@Override
public int getPackedLightmapCoords(IBlockState state, IBlockAccess world, BlockPos pos)
{
int lightThis = world.getCombinedLight(pos, 0);
int lightUp = world.getCombinedLight(pos.up(), 0);
int lightThisBase = lightThis & 255;
int lightUpBase = lightUp & 255;
int lightThisExt = lightThis >> 16 & 255;
int lightUpExt = lightUp >> 16 & 255;
return (lightThisBase > lightUpBase ? lightThisBase : lightUpBase) |
((lightThisExt > lightUpExt ? lightThisExt : lightUpExt) << 16);
}
示例10: getPackedLightmapCoords
import net.minecraft.world.IBlockAccess; //導入方法依賴的package包/類
@SideOnly(Side.CLIENT)
public int getPackedLightmapCoords(IBlockState state, IBlockAccess source, BlockPos pos)
{
int i = source.getCombinedLight(pos, 0);
int j = source.getCombinedLight(pos.up(), 0);
int k = i & 255;
int l = j & 255;
int i1 = i >> 16 & 255;
int j1 = j >> 16 & 255;
return (k > l ? k : l) | (i1 > j1 ? i1 : j1) << 16;
}