Package org.bukkit.generator
Interface LimitedRegion
- All Superinterfaces:
- net.kyori.adventure.key.Keyed,- Keyed,- RegionAccessor
A limited region is used in world generation for features which are
 going over a chunk. For example, trees or ores.
 Use 
getBuffer() to know how much you can go beyond the central
 chunk. The buffer zone may or may not be already populated.
 The coordinates are absolute from the world origin.- 
Method SummaryModifier and TypeMethodDescriptiongetBlockData(@NotNull Vector vector) Gets theBlockDataof the block at the provided coordinates.default @NotNull BlockStategetBlockState(@NotNull Vector location) Gets theBlockStateat a location.intGets the buffer around the central chunk which is accessible.default intGets the X-coordinate of the block in the center of the region.default intGets the Z-coordinate of the block in the center of the region.intGets the X-coordinate of the chunk in the center of the region.intGets the Z-coordinate of the chunk in the center of the region.Gets a list of all tile entities in the limited region including the buffer zone.getWorld()Gets theWorldobject this region represents.booleanisInRegion(int x, int y, int z) Checks if the given coordinates are in the region.booleanisInRegion(@NotNull Location location) Checks if the givenLocationis in the region.voidscheduleBlockUpdate(int x, int y, int z) Schedules a block update at (x, y, z).default voidscheduleBlockUpdate(@NotNull Vector location) Schedules a block update at a vector location.voidscheduleFluidUpdate(int x, int y, int z) Schedules a fluid update at (x, y, z).default voidscheduleFluidUpdate(@NotNull Vector location) Schedules a fluid update at a vector location.default voidsetBlockData(@NotNull Vector vector, @NotNull BlockData data) Sets the block at a vector location to the providedBlockData.voidsetBlockState(int x, int y, int z, @NotNull BlockState state) Sets theBlockStateat a location.default voidsetBlockState(@NotNull Vector location, @NotNull BlockState state) Sets theBlockStateat a location.Methods inherited from interface org.bukkit.RegionAccessorgenerateTree, generateTree, generateTree, getBiome, getBiome, getBlockData, getBlockData, getBlockState, getBlockState, getComputedBiome, getEntities, getEntitiesByClass, getEntitiesByClasses, getHighestBlockYAt, getHighestBlockYAt, getHighestBlockYAt, getHighestBlockYAt, getKey, getLivingEntities, getMoonPhase, getType, getType, hasCollisionsIn, lineOfSightExists, setBiome, setBiome, setBlockData, setBlockData, setType, setType, spawn, spawn, spawn, spawn, spawn, spawn, spawnEntity, spawnEntity, spawnEntity, spawnEntity
- 
Method Details- 
getBufferint getBuffer()Gets the buffer around the central chunk which is accessible. The returned value is in normal world coordinate scale.For example: If the method returns 16 you have a working area of 48x48. - Returns:
- The buffer in X and Z direction
 
- 
isInRegionChecks if the givenLocationis in the region.- Parameters:
- location- the location to check
- Returns:
- true if the location is in the region, otherwise false.
 
- 
isInRegionboolean isInRegion(int x, int y, int z) Checks if the given coordinates are in the region.- Parameters:
- x- X-coordinate to check
- y- Y-coordinate to check
- z- Z-coordinate to check
- Returns:
- true if the coordinates are in the region, otherwise false.
 
- 
getTileEntitiesGets a list of all tile entities in the limited region including the buffer zone.- Returns:
- a list of tile entities.
 
- 
setBlockDataSets the block at a vector location to the providedBlockData.
- 
setBlockStateSets theBlockStateat a location.- Parameters:
- x- X coordinate.
- y- Y coordinate.
- z- Z coordinate.
- state- The block state.
 
- 
setBlockStateSets theBlockStateat a location.- Parameters:
- location- Location to set block state.
- state- The block state.
 
- 
getBlockStateGets theBlockStateat a location.- Parameters:
- location- Location to get block state from.
- Returns:
- The block state.
 
- 
scheduleBlockUpdatevoid scheduleBlockUpdate(int x, int y, int z) Schedules a block update at (x, y, z).- Parameters:
- x- X coordinate
- y- Y coordinate
- z- Z coordinate
 
- 
scheduleBlockUpdateSchedules a block update at a vector location.- Parameters:
- location-- Vectorrepresenting the position of the block to update.
 
- 
scheduleFluidUpdatevoid scheduleFluidUpdate(int x, int y, int z) Schedules a fluid update at (x, y, z).- Parameters:
- x- X coordinate
- y- Y coordinate
- z- Z coordinate
 
- 
scheduleFluidUpdateSchedules a fluid update at a vector location.- Parameters:
- location-- Vectorrepresenting the position of the block to update.
 
- 
getWorldGets theWorldobject this region represents.Do not attempt to read from/write to this world! Doing so during generation will cause a deadlock! - Returns:
- The Worldobject that this region represents.
 
- 
getBlockDataGets theBlockDataof the block at the provided coordinates.
- 
getCenterChunkXint getCenterChunkX()Gets the X-coordinate of the chunk in the center of the region.- Returns:
- The center chunk's X coordinate.
 
- 
getCenterBlockXdefault int getCenterBlockX()Gets the X-coordinate of the block in the center of the region.- Returns:
- The center chunk's X coordinate.
 
- 
getCenterChunkZint getCenterChunkZ()Gets the Z-coordinate of the chunk in the center of the region.- Returns:
- The center chunk's Z coordinate.
 
- 
getCenterBlockZdefault int getCenterBlockZ()Gets the Z-coordinate of the block in the center of the region.- Returns:
- The center chunk's Z coordinate.
 
 
-