本文整理了Java中net.minecraft.world.World.getPrecipitationHeight()
方法的一些代码示例,展示了World.getPrecipitationHeight()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。World.getPrecipitationHeight()
方法的具体详情如下:
包路径:net.minecraft.world.World
类名称:World
方法名:getPrecipitationHeight
暂无
代码示例来源:origin: SleepyTrousers/EnderIO
@Override
public @Nonnull BlockPos getPrecipitationHeight(@Nonnull BlockPos pos) {
return wrapped.getPrecipitationHeight(pos);
}
代码示例来源:origin: amadornes/MCMultiPart
@Override
public BlockPos getPrecipitationHeight(BlockPos pos) {
return getActualWorld().getPrecipitationHeight(pos);
}
代码示例来源:origin: TerraFirmaCraft/TerraFirmaCraft
final BlockPos p2 = world.getPrecipitationHeight(chunkPos.add(rng.nextInt(16) + 8, 0, rng.nextInt(16) + 8));
if (ClimateTFC.getHeightAdjustedBiomeTemp(world, p2) >= 7)
waterplantGen.generate(world, rng, p2);
代码示例来源:origin: PenguinSquad/Harvest-Festival
public static boolean isRainingAt(World world, BlockPos pos) {
Biome biome = world.getBiome(pos);
Weather weather = HFApi.calendar.getWeather(world);
return (weather.isRain() || (weather.isSnow() && biome.isHighHumidity())) && world.canBlockSeeSky(pos) && world.getPrecipitationHeight(pos).getY() <= pos.getY() && world.getBiome(pos).canRain();
}
}
代码示例来源:origin: TerraFirmaCraft/TerraFirmaCraft
final int y = world.getPrecipitationHeight(blockpos.add(x, 0, z)).getY();
代码示例来源:origin: PenguinSquad/Harvest-Festival
BlockPos blockpos1 = world.getPrecipitationHeight(blockpos.add(random.nextInt(10) - random.nextInt(10), 0, random.nextInt(10) - random.nextInt(10)));
Biome biome = world.getBiome(blockpos1);
BlockPos blockpos2 = blockpos1.down();
代码示例来源:origin: McJtyMods/LostCities
for (k1 = 0; doGen && k1 < 16; ++k1) {
for (l1 = 0; l1 < 16; ++l1) {
i2 = w.getPrecipitationHeight(new BlockPos(x + k1, 0, z + l1)).getY();
代码示例来源:origin: P3pp3rF1y/AncientWarfare2
public static void sprinkleSnow(World world, StructureBB bb, int border) {
BlockPos p1 = bb.min.add(-border, 0, -border);
BlockPos p2 = bb.max.add(border, 0, border);
for (int x = p1.getX(); x <= p2.getX(); x++) {
for (int z = p1.getZ(); z <= p2.getZ(); z++) {
int y = world.getPrecipitationHeight(new BlockPos(x, 1, z)).getY() - 1;
BlockPos pos = new BlockPos(x, y, z);
if (p2.getY() >= y && y > 0 && world.canSnowAtBody(pos.up(), true)) {
IBlockState state = world.getBlockState(pos);
Block block = state.getBlock();
if (block != Blocks.AIR && state.getBlockFaceShape(world, pos, EnumFacing.UP) == BlockFaceShape.SOLID) {
world.setBlockState(pos.up(), Blocks.SNOW_LAYER.getDefaultState());
}
}
}
}
}
代码示例来源:origin: Glitchfiend/SereneSeasons
@SubscribeEvent
public void onPopulateChunk(PopulateChunkEvent.Populate event)
{
if (!event.getWorld().isRemote && event.getType() != PopulateChunkEvent.Populate.EventType.ICE || !SeasonsConfig.isDimensionWhitelisted(event.getWorld().provider.getDimension()))
return;
event.setResult(Event.Result.DENY);
BlockPos blockpos = new BlockPos(event.getChunkX() * 16, 0, event.getChunkZ() * 16).add(8, 0, 8);
for (int k2 = 0; k2 < 16; ++k2)
{
for (int j3 = 0; j3 < 16; ++j3)
{
BlockPos blockpos1 = event.getWorld().getPrecipitationHeight(blockpos.add(k2, 0, j3));
BlockPos blockpos2 = blockpos1.down();
if (SeasonASMHelper.canBlockFreezeInSeason(event.getWorld(), blockpos2, false, SeasonHelper.getSeasonState(event.getWorld()), true))
{
event.getWorld().setBlockState(blockpos2, Blocks.ICE.getDefaultState(), 2);
}
if (SeasonASMHelper.canSnowAtInSeason(event.getWorld(), blockpos1, true, SeasonHelper.getSeasonState(event.getWorld()), true))
{
event.getWorld().setBlockState(blockpos1, Blocks.SNOW_LAYER.getDefaultState(), 2);
}
}
}
}
代码示例来源:origin: PenguinSquad/Harvest-Festival
int j2 = world.getPrecipitationHeight(blockpos$mutableblockpos).getY();
int k2 = j - i1;
int l2 = j + i1;
内容来源于网络,如有侵权,请联系作者删除!