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>
GenerationChunk
s that are being generated for a
ServerWorld
. Upon completion, the chunks in this region will be
converted into WorldChunk
s and inserted into the target
world
.
A region is similar to a world in that there are GenerationChunk
s
available, BlockState
s 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
ServerLocation
s, they are not considered to be viewable by
Player
s and they are not accessible by the Server
or ServerWorld
(s).
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.spongepowered.api.world.volume.biome.BiomeVolume
BiomeVolume.Immutable, BiomeVolume.Modifiable<M extends BiomeVolume.Modifiable<M>>, BiomeVolume.Mutable, BiomeVolume.Streamable<B extends BiomeVolume.Streamable<B>>, BiomeVolume.Unmodifiable<U extends BiomeVolume.Unmodifiable<U>>
Nested classes/interfaces inherited from interface org.spongepowered.api.world.volume.block.entity.BlockEntityVolume
BlockEntityVolume.Modifiable<M extends BlockEntityVolume.Modifiable<M>>, BlockEntityVolume.Mutable, BlockEntityVolume.Streamable<T extends BlockEntityVolume.Streamable<T>>, BlockEntityVolume.Unmodifiable<U extends BlockEntityVolume.Unmodifiable<U>>
Nested classes/interfaces inherited from interface org.spongepowered.api.world.volume.block.BlockVolume
BlockVolume.Immutable, BlockVolume.Modifiable<M extends BlockVolume.Modifiable<M>>, BlockVolume.Mutable, BlockVolume.Streamable<B extends BlockVolume.Streamable<B>>, BlockVolume.Unmodifiable<U extends BlockVolume.Unmodifiable<U>>
Nested classes/interfaces inherited from interface org.spongepowered.api.world.volume.entity.EntityVolume
EntityVolume.EntityVolumeFactory, EntityVolume.Immutable, EntityVolume.Modifiable<M extends EntityVolume.Modifiable<M>>, EntityVolume.Mutable, EntityVolume.Streamable<E extends EntityVolume.Streamable<E>>, EntityVolume.Unmodifiable<U extends EntityVolume.Unmodifiable<U>>
Nested classes/interfaces inherited from interface org.spongepowered.api.world.volume.game.GenerationVolume
GenerationVolume.Mutable
Nested classes/interfaces inherited from interface org.spongepowered.api.world.volume.game.LocationBaseDataHolder
LocationBaseDataHolder.Mutable
Nested classes/interfaces inherited from interface org.spongepowered.api.util.RandomProvider
RandomProvider.Source
-
Method Summary
Modifier and TypeMethodDescriptionchunk
(int cx, int cy, int cz) Gets theGenerationChunk
at the given chunk co-ordinatesdefault GenerationChunk
Gets theGenerationChunk
at the given chunk co-ordinatesdefault GenerationChunk
chunkAtBlock
(int x, int y, int z) Gets theGenerationChunk
at the given block co-ordinatesdefault GenerationChunk
chunkAtBlock
(Vector3i position) Gets theGenerationChunk
at the given block co-ordinateschunkMax()
The maximum chunk co-ordinate of this region.chunkMin()
The minimum chunk co-ordinate of this region.engine()
Gets theServer
engine.worldKey()
TheResourceKey
of theServerWorld
that this region will be placed into.Methods inherited from interface org.spongepowered.api.world.volume.biome.BiomeVolume
biome, biome
Methods inherited from interface org.spongepowered.api.world.volume.biome.BiomeVolume.Modifiable
setBiome, setBiome
Methods inherited from interface org.spongepowered.api.world.volume.biome.BiomeVolume.Streamable
biomeStream
Methods inherited from interface org.spongepowered.api.world.volume.block.entity.BlockEntityVolume
blockEntities, blockEntities, blockEntity, blockEntity
Methods inherited from interface org.spongepowered.api.world.volume.block.entity.BlockEntityVolume.Modifiable
addBlockEntity, addBlockEntity, removeBlockEntity, removeBlockEntity
Methods inherited from interface org.spongepowered.api.world.volume.block.entity.BlockEntityVolume.Streamable
blockEntityStream
Methods inherited from interface org.spongepowered.api.world.volume.block.BlockVolume
block, block, fluid, fluid, highestPositionAt, highestYAt, highestYAt
Methods inherited from interface org.spongepowered.api.world.volume.block.BlockVolume.Streamable
blockStateStream
Methods inherited from interface org.spongepowered.api.world.volume.game.ChunkVolume
chunkLayout, hasChunk, hasChunk, hasChunkAtBlock, hasChunkAtBlock, isChunkLoaded, isChunkLoaded, isChunkLoadedAtBlock, isChunkLoadedAtBlock
Methods inherited from interface org.spongepowered.api.world.volume.entity.EntityVolume
entities, entities, entities, entities, entities, entity, nearbyEntities, nearestPlayer, players
Methods inherited from interface org.spongepowered.api.world.volume.entity.EntityVolume.Modifiable
createEntity, createEntity, createEntity, createEntity, createEntity, createEntity, createEntityNaturally, createEntityNaturally, createEntityNaturally, createEntityNaturally, spawnEntities, spawnEntity
Methods inherited from interface org.spongepowered.api.world.volume.entity.EntityVolume.Streamable
entityStream
Methods inherited from interface org.spongepowered.api.world.volume.game.EnvironmentalVolume
isSkylightMax, light, light, light, light, light, light
Methods inherited from interface org.spongepowered.api.world.volume.game.GenerationVolume
hasBlockState, hasBlockState, hasBlockState, maximumHeight
Methods inherited from interface org.spongepowered.api.world.volume.game.HeightAwareVolume
height, height
Methods inherited from interface org.spongepowered.api.world.volume.game.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, supports
Methods inherited from interface org.spongepowered.api.world.volume.game.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, validateRawData
Methods inherited from interface org.spongepowered.api.world.volume.game.MutableGameVolume
destroyBlock, spawnEntity
Methods inherited from interface org.spongepowered.api.world.volume.block.PhysicsAwareMutableBlockVolume
setBlock, setBlock
Methods inherited from interface org.spongepowered.api.world.volume.game.PrimitiveGameVolume
emittedLight, emittedLight, height, maximumLight
Methods inherited from interface org.spongepowered.api.util.RandomProvider
random
Methods inherited from interface org.spongepowered.api.world.volume.game.Region
border, canSeeSky, canSeeSky, containsAnyLiquids, hasLiquid, hasLiquid, isAreaLoaded, isAreaLoaded, isAreaLoaded, isAreaLoaded, isAreaLoaded, isBlockLoaded, isBlockLoaded, isBlockLoaded, isBlockLoaded, isCollisionBoxesEmpty, isInBorder, seaLevel, setBorder, skylightSubtracted, worldType
Methods inherited from interface org.spongepowered.api.world.volume.game.UpdatableVolume
scheduledBlockUpdates, scheduledFluidUpdates
Methods inherited from interface org.spongepowered.api.world.volume.Volume
available, contains, contains, isAreaAvailable, max, min, size
Methods inherited from interface org.spongepowered.api.world.WorldLike
difficulty, removeBlock, removeBlock, seed, setBlock, setBlock
-
Method Details
-
worldKey
ResourceKey worldKey()TheResourceKey
of theServerWorld
that 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
ServerWorld
instances are not thread safe, you should ensure thatEngine.onMainThread()
istrue
before retreving the world.- Returns:
- The
ResourceKey
that represents the targetServerWorld
-
engine
Server engine()Gets theServer
engine.- Specified by:
engine
in interfaceWorldLike<GenerationRegion>
- Returns:
- The
Server
-
chunkMin
Vector3i chunkMin()The minimum chunk co-ordinate of this region.- Returns:
- The chunk co-ordinate as a
Vector3i
-
chunkMax
Vector3i chunkMax()The maximum chunk co-ordinate of this region.- Returns:
- The chunk co-ordinate as a
Vector3i
-
chunkAtBlock
Gets theGenerationChunk
at the given block co-ordinates- Specified by:
chunkAtBlock
in interfaceChunkVolume
- Parameters:
position
- The block position- Returns:
- The
GenerationChunk
- Throws:
IllegalArgumentException
- if the provided co-ordinates are out of bounds.
-
chunkAtBlock
Gets theGenerationChunk
at the given block co-ordinates- Specified by:
chunkAtBlock
in 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 theGenerationChunk
at the given chunk co-ordinates- Specified by:
chunk
in interfaceChunkVolume
- Parameters:
chunkPosition
- The chunk co-ordinates- Returns:
- The
GenerationChunk
- Throws:
IllegalArgumentException
- if the provided co-ordinates are out of bounds.
-
chunk
Gets theGenerationChunk
at the given chunk co-ordinates- Specified by:
chunk
in 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.
-