protected void playMoodSoundAndCheckLight(int p_147467_1_, int p_147467_2_, Chunk chunkIn)
{
super.playMoodSoundAndCheckLight(p_147467_1_, p_147467_2_, chunkIn);
if (this.ambienceTicks == 0)
{
this.updateLCG = this.updateLCG * 3 + 1013904223;
int i = this.updateLCG >> 2;
int j = i & 15;
int k = i >> 8 & 15;
int l = i >> 16 & 255;
BlockPos blockpos = new BlockPos(j + p_147467_1_, l, k + p_147467_2_);
IBlockState iblockstate = chunkIn.getBlockState(blockpos);
j = j + p_147467_1_;
k = k + p_147467_2_;
if (iblockstate.getMaterial() == Material.AIR && this.getLight(blockpos) <= this.rand.nextInt(8) && this.getLightFor(EnumSkyBlock.SKY, blockpos) <= 0 && this.mc.thePlayer != null && this.mc.thePlayer.getDistanceSq((double)j + 0.5D, (double)l + 0.5D, (double)k + 0.5D) > 4.0D)
{
this.playSound((double)j + 0.5D, (double)l + 0.5D, (double)k + 0.5D, SoundEvents.AMBIENT_CAVE, SoundCategory.AMBIENT, 0.7F, 0.8F + this.rand.nextFloat() * 0.2F, false);
this.ambienceTicks = this.rand.nextInt(12000) + 6000;
}
}
}
WorldClient.java 文件源码
java
阅读 39
收藏 0
点赞 0
评论 0
项目:CustomWorldGen
作者:
评论列表
文章目录