コード例 #1
0
 @Override
 public ChunkViewCore getSubviewAroundChunk(Vector3i chunkPos) {
   Region3i region =
       Region3i.createFromCenterExtents(chunkPos, ChunkConstants.LOCAL_REGION_EXTENTS);
   if (getChunk(chunkPos) != null) {
     return createWorldView(
         region, new Vector3i(-region.min().x, -region.min().y, -region.min().z));
   }
   return null;
 }
コード例 #2
0
 @Override
 public ChunkViewCore getSubviewAroundBlock(Vector3i blockPos, int extent) {
   Region3i region = ChunkMath.getChunkRegionAroundWorldPos(blockPos, extent);
   return createWorldView(region, new Vector3i(-region.min().x, -region.min().y, -region.min().z));
 }