Interface GenerationRegion
- All Superinterfaces:
BiomeVolume, BiomeVolume.Modifiable<GenerationRegion>, BiomeVolume.Streamable<GenerationRegion>, BlockEntityVolume, BlockEntityVolume.Modifiable<GenerationRegion>, BlockEntityVolume.Streamable<GenerationRegion>, BlockVolume, BlockVolume.Modifiable<GenerationRegion>, BlockVolume.Streamable<GenerationRegion>, ChunkVolume, EntityVolume, EntityVolume.Modifiable<GenerationRegion>, EntityVolume.Streamable<GenerationRegion>, EnvironmentalVolume, GenerationVolume, GenerationVolume.Mutable, HeightAwareVolume, LocationBaseDataHolder, LocationBaseDataHolder.Mutable, MutableGameVolume, MutableVolume, PhysicsAwareMutableBlockVolume<GenerationRegion>, PrimitiveGameVolume, RandomProvider, Region<GenerationRegion>, UpdatableVolume, Volume, WorldLike<GenerationRegion>
GenerationChunks that are being generated for a
ServerWorld. Upon completion, the chunks in this region will be
converted into WorldChunks and inserted into the target
world.
A region is similar to a world in that there are GenerationChunks
available, BlockStates are used in this region, and likewise, the
region can contain and store BlockEntity instances being generated,
Entity instances being generated or spawned by generation, etc.
The major differences are that a generation region cannot be utilized for
ServerLocations, they are not considered to be viewable by
Players and they are not accessible by the Server
or ServerWorld(s).
-
Nested Class Summary
Nested classes/interfaces inherited from interface BiomeVolume
BiomeVolume.Immutable, BiomeVolume.Modifiable<M>, BiomeVolume.Mutable, BiomeVolume.Streamable<B>, BiomeVolume.Unmodifiable<U>Nested classes/interfaces inherited from interface BlockEntityVolume
BlockEntityVolume.Modifiable<M>, BlockEntityVolume.Mutable, BlockEntityVolume.Streamable<T>, BlockEntityVolume.Unmodifiable<U>Nested classes/interfaces inherited from interface BlockVolume
BlockVolume.Immutable, BlockVolume.Modifiable<M>, BlockVolume.Mutable, BlockVolume.Streamable<B>, BlockVolume.Unmodifiable<U>Nested classes/interfaces inherited from interface EntityVolume
EntityVolume.EntityVolumeFactory, EntityVolume.Immutable, EntityVolume.Modifiable<M>, EntityVolume.Mutable, EntityVolume.Streamable<E>, EntityVolume.Unmodifiable<U>Nested classes/interfaces inherited from interface GenerationVolume
GenerationVolume.MutableNested classes/interfaces inherited from interface LocationBaseDataHolder
LocationBaseDataHolder.MutableNested classes/interfaces inherited from interface RandomProvider
RandomProvider.Source -
Method Summary
Modifier and TypeMethodDescriptionchunk(int cx, int cy, int cz) Gets theGenerationChunkat the given chunk co-ordinatesdefault GenerationChunkGets theGenerationChunkat the given chunk co-ordinatesdefault GenerationChunkchunkAtBlock(int x, int y, int z) Gets theGenerationChunkat the given block co-ordinatesdefault GenerationChunkchunkAtBlock(Vector3i position) Gets theGenerationChunkat the given block co-ordinateschunkMax()The maximum chunk co-ordinate of this region.chunkMin()The minimum chunk co-ordinate of this region.engine()Gets theServerengine.worldKey()TheResourceKeyof theServerWorldthat this region will be placed into.Methods inherited from interface BiomeVolume
biome, biomeMethods inherited from interface BiomeVolume.Modifiable
setBiome, setBiomeMethods inherited from interface BiomeVolume.Streamable
biomeStreamMethods inherited from interface BlockEntityVolume
blockEntities, blockEntities, blockEntity, blockEntityMethods inherited from interface BlockEntityVolume.Modifiable
addBlockEntity, addBlockEntity, removeBlockEntity, removeBlockEntityMethods inherited from interface BlockEntityVolume.Streamable
blockEntityStreamMethods inherited from interface BlockVolume
block, block, blockPalette, fluid, fluid, highestPositionAt, highestYAt, highestYAtMethods inherited from interface BlockVolume.Streamable
blockStateStreamMethods inherited from interface ChunkVolume
chunkLayout, hasChunk, hasChunk, hasChunkAtBlock, hasChunkAtBlock, isChunkLoaded, isChunkLoaded, isChunkLoadedAtBlock, isChunkLoadedAtBlockMethods inherited from interface EntityVolume
entities, entities, entities, entities, entities, entity, nearbyEntities, nearestPlayer, playersMethods inherited from interface EntityVolume.Modifiable
createEntity, createEntity, createEntity, createEntity, createEntity, createEntity, createEntityNaturally, createEntityNaturally, createEntityNaturally, createEntityNaturally, filterEntities, filterEntities, filterEntities, filterEntities, filterEntities, spawnEntities, spawnEntityMethods inherited from interface EntityVolume.Streamable
entityStreamMethods inherited from interface EnvironmentalVolume
isSkylightMax, light, light, light, light, light, lightMethods inherited from interface GenerationVolume
hasBlockState, hasBlockState, hasBlockState, maximumHeightMethods inherited from interface HeightAwareVolume
height, heightMethods inherited from interface LocationBaseDataHolder
get, get, get, get, getDouble, getDouble, getDouble, getDouble, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getValue, getValue, getValue, getValue, getValues, getValues, keys, keys, orElse, orElse, orElse, orElse, orElse, orElse, orElse, orElse, orNull, orNull, orNull, orNull, require, require, require, require, supports, supports, supports, supports, supports, supportsMethods inherited from interface LocationBaseDataHolder.Mutable
copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, offer, offer, offer, offer, offer, offer, remove, remove, remove, remove, setRawData, setRawData, transform, transform, transform, transform, undo, undo, validateRawData, validateRawDataMethods inherited from interface MutableGameVolume
destroyBlock, spawnEntityMethods inherited from interface PhysicsAwareMutableBlockVolume
setBlock, setBlockMethods inherited from interface PrimitiveGameVolume
emittedLight, emittedLight, height, maximumLightMethods inherited from interface RandomProvider
randomMethods inherited from interface Region
border, canSeeSky, canSeeSky, containsAnyLiquids, hasLiquid, hasLiquid, isAreaLoaded, isAreaLoaded, isAreaLoaded, isAreaLoaded, isAreaLoaded, isBlockLoaded, isBlockLoaded, isBlockLoaded, isBlockLoaded, isCollisionBoxesEmpty, isInBorder, seaLevel, setBorder, skylightSubtracted, worldTypeMethods inherited from interface UpdatableVolume
scheduledBlockUpdates, scheduledFluidUpdatesMethods inherited from interface Volume
available, contains, contains, isAreaAvailable, max, min, sizeMethods inherited from interface WorldLike
difficulty, removeBlock, removeBlock, seed, setBlock, setBlock
-
Method Details
-
worldKey
ResourceKey worldKey()TheResourceKeyof theServerWorldthat this region will be placed into.As generation regions are designed to be thread-safe with regards to world generation, it is entirely possible that you may retrieve a region off the main server thread. As
ServerWorldinstances are not thread safe, you should ensure thatEngine.onMainThread()istruebefore retreving the world.- Returns:
- The
ResourceKeythat represents the targetServerWorld
-
engine
-
chunkMin
-
chunkMax
-
chunkAtBlock
Gets theGenerationChunkat the given block co-ordinates- Specified by:
chunkAtBlockin interfaceChunkVolume- Parameters:
position- The block position- Returns:
- The
GenerationChunk - Throws:
IllegalArgumentException- if the provided co-ordinates are out of bounds.
-
chunkAtBlock
Gets theGenerationChunkat the given block co-ordinates- Specified by:
chunkAtBlockin interfaceChunkVolume- Parameters:
x- The x co-ordinatey- The y co-ordinatez- The z co-ordinate- Returns:
- The
GenerationChunk - Throws:
IllegalArgumentException- if the provided co-ordinates are out of bounds.
-
chunk
Gets theGenerationChunkat the given chunk co-ordinates- Specified by:
chunkin interfaceChunkVolume- Parameters:
chunkPosition- The chunk co-ordinates- Returns:
- The
GenerationChunk - Throws:
IllegalArgumentException- if the provided co-ordinates are out of bounds.
-
chunk
Gets theGenerationChunkat the given chunk co-ordinates- Specified by:
chunkin interfaceChunkVolume- Parameters:
cx- The x co-ordinatecy- The y co-ordinatecz- The z co-ordinate- Returns:
- The
GenerationChunk - Throws:
IllegalArgumentException- if the provided co-ordinates are out of bounds.
-