本文整理汇总了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;
}