当前位置: 首页>>代码示例>>Java>>正文


Java IBlockAccess.getCombinedLight方法代码示例

本文整理汇总了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;
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:17,代码来源:Block.java

示例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;
    }
}
 
开发者ID:cubex2,项目名称:customstuff4,代码行数:17,代码来源:BlockSlab.java

示例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;
      }
  }
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:21,代码来源:Block.java

示例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;
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:18,代码来源:Block.java

示例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;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:11,代码来源:BlockLiquid.java

示例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;
	}
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:13,代码来源:Block.java

示例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;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:10,代码来源:BlockLiquid.java

示例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;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:11,代码来源:BlockLiquid.java

示例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);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:13,代码来源:BlockFluidBase.java

示例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;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:12,代码来源:BlockLiquid.java


注:本文中的net.minecraft.world.IBlockAccess.getCombinedLight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。