net.minecraft.world.World.canSnowAt()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中net.minecraft.world.World.canSnowAt()方法的一些代码示例,展示了World.canSnowAt()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。World.canSnowAt()方法的具体详情如下:
包路径:net.minecraft.world.World
类名称:World
方法名:canSnowAt

World.canSnowAt介绍

暂无

代码示例

代码示例来源:origin: SleepyTrousers/EnderIO

@Override
public boolean canSnowAt(@Nonnull BlockPos pos, boolean checkLight) {
 return wrapped.canSnowAt(pos, checkLight);
}

代码示例来源:origin: amadornes/MCMultiPart

@Override
public boolean canSnowAt(BlockPos pos, boolean checkLight) {
  return getActualWorld().canSnowAt(pos, checkLight);
}

代码示例来源:origin: Glitchfiend/SereneSeasons

public static boolean isRainingAtInSeason(World world, BlockPos pos, ISeasonState seasonState)
{
  Biome biome = world.getBiome(pos);
  if (BiomeConfig.usesTropicalSeasons(biome) && BiomeConfig.enablesSeasonalEffects(biome) && SeasonsConfig.isDimensionWhitelisted(world.provider.getDimension()))
  {
    Season.TropicalSeason tropicalSeason = seasonState.getTropicalSeason();
    switch ((Season.TropicalSeason) tropicalSeason)
    {
      case MID_DRY:
        return false;
        
      case MID_WET:
        return true;
        
      default:
        return biome.canRain();
    }
  }
  if (biome.getEnableSnow() || (world.canSnowAt(pos, false)))
  {
    return false;
  }
  return biome.canRain();
}

代码示例来源:origin: McJtyMods/LostCities

if (w.canSnowAt(new BlockPos(k1 + x, i2, l1 + z), true)) {
  w.setBlockState(new BlockPos(k1 + x, i2, l1 + z), Blocks.SNOW_LAYER.getDefaultState(), 2);

相关文章

微信公众号

最新文章

更多

World类方法