Interface OutputExtent
- All Known Subinterfaces:
Clipboard
,Extent
,ReorderingExtent
,World
- All Known Implementing Classes:
AbstractBufferingExtent
,AbstractDelegateExtent
,AbstractWorld
,BiomeQuirkExtent
,BlockArrayClipboard
,BlockBagExtent
,BlockChangeLimiter
,BlockQuirkExtent
,BlockTransformExtent
,ChangeSetExtent
,ChunkBatchingExtent
,ChunkLoadingExtent
,DataValidatorExtent
,EditSession
,ExtentBuffer
,ForgetfulExtentBuffer
,LastAccessExtentCache
,MaskingExtent
,MultiStageReorder
,NullExtent
,NullWorld
,RequestExtent
,SideEffectExtent
,SurvivalModeExtent
,TracingExtent
,WatchdogTickingExtent
-
Method Summary
Modifier and TypeMethodDescriptioncommit()
Return anOperation
that should be called to tie up loose ends (such as to commit changes in a buffer).default boolean
Check if this extent fully supports 3D biomes.default boolean
setBiome
(BlockVector2 position, BiomeType biome) Deprecated.default boolean
setBiome
(BlockVector3 position, BiomeType biome) Set the biome.<T extends BlockStateHolder<T>>
booleansetBlock
(BlockVector3 position, T block) Change the block at the given location to the given block.
-
Method Details
-
setBlock
<T extends BlockStateHolder<T>> boolean setBlock(BlockVector3 position, T block) throws WorldEditException Change the block at the given location to the given block. The operation may not tie the givenBlockStateHolder
to the world, so future changes to theBlockStateHolder
do not affect the world until this method is called again.The return value of this method indicates whether the change was probably successful. It may not be successful if, for example, the location is out of the bounds of the extent. It may be unsuccessful if the block passed is the same as the one in the world. However, the return value is only an estimation and it may be incorrect, but it could be used to count, for example, the approximate number of changes.
- Parameters:
position
- position of the blockblock
- block to set- Returns:
- true if the block was successfully set (return value may not be accurate)
- Throws:
WorldEditException
- thrown on an error
-
fullySupports3DBiomes
default boolean fullySupports3DBiomes()Check if this extent fully supports 3D biomes.If
false
, the extent only visually reads biomes fromy = 0
. The biomes will still be set in 3D, but the client will only see the one aty = 0
. It is up to the caller to determine if they want to set that biome instead, or simply warn the actor.- Returns:
- if the extent fully supports 3D biomes
-
setBiome
Deprecated.Biomes in Minecraft are 3D now, usesetBiome(BlockVector3, BiomeType)
Set the biome.- Parameters:
position
- the (x, z) location to set the biome atbiome
- the biome to set to- Returns:
- true if the biome was successfully set (return value may not be accurate)
-
setBiome
@NonAbstractForCompatibility(delegateName="setBiome", delegateParams={BlockVector3.class,BiomeType.class}) default boolean setBiome(BlockVector3 position, BiomeType biome) Set the biome.As implementation varies per Minecraft version, this may set more than this position's biome. On versions prior to 1.15, this will set the entire column. On later versions it will set the 4x4x4 cube.
- Parameters:
position
- the (x, y, z) location to set the biome atbiome
- the biome to set to- Returns:
- true if the biome was successfully set (return value may not be accurate)
- API Note:
- This must be overridden by new subclasses. See
NonAbstractForCompatibility
for details
-
commit
Return anOperation
that should be called to tie up loose ends (such as to commit changes in a buffer).- Returns:
- an operation or null if there is none to execute
-
setBiome(BlockVector3, BiomeType)