0299名無しのスティーブ
2017/11/30(木) 11:01:40.97ID:GQVLOW+nごめん。調べ方が足りなかったらしい
たしかにgetRandomChunkPosition()やchunk.getHeight()部分はそのままだったけど
Chank.javaでHeightMapの再生成の時に光度をチェックしてるね
ただチャンクごとなのは今までどおりだった
WorldEntitySpawner.java(193)
private static BlockPos getRandomChunkPosition(World worldIn, int x, int z)
{
Chunk chunk = worldIn.getChunkFromChunkCoords(x, z);
int i = x * 16 + worldIn.rand.nextInt(16);
int j = z * 16 + worldIn.rand.nextInt(16);
int k = MathHelper.roundUp(chunk.getHeight(new BlockPos(i, 0, j)) + 1, 16);
int l = worldIn.rand.nextInt(k > 0 ? k : chunk.getTopFilledSegment() + 16 - 1);
return new BlockPos(i, l, j);
}
Chunk.java(155)
public int getHeightValue(int x, int z)
{
return this.heightMap[z << 4 | x];
}
Chank.java(203) generateHeightMap内
if (this.getBlockLightOpacity(j, l - 1, k) != 0)
{
this.heightMap[k << 4 | j] = l;
if (l < this.heightMapMinimum)
{
this.heightMapMinimum = l;
}
break;
}