Interface StructureBlock
-
- All Superinterfaces:
BlockEntity
,CopyableDataHolder
,DataHolder
,DataHolder.Mutable
,DataSerializable
,Locatable
,SerializableDataHolder
,SerializableDataHolder.Mutable
,ValueContainer
public interface StructureBlock extends BlockEntity
Represents a StructureBlock.StructureBlock blocks can be used to save and load structures, alongside
structure void
blocks.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.spongepowered.api.data.DataHolder
DataHolder.Immutable<I extends DataHolder.Immutable<I>>, DataHolder.Mutable
-
Nested classes/interfaces inherited from interface org.spongepowered.api.data.SerializableDataHolder
SerializableDataHolder.Immutable<I extends SerializableDataHolder.Immutable<I>>, SerializableDataHolder.Mutable
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Optional<Value.Mutable<String>>
author()
default Value.Mutable<Boolean>
ignoreEntities()
default Value.Mutable<Double>
integrity()
default Value.Mutable<StructureMode>
mode()
default Value.Mutable<Vector3i>
position()
default Value.Mutable<Boolean>
powered()
default Value.Mutable<Long>
seed()
default Value.Mutable<Boolean>
showAir()
default Value.Mutable<Boolean>
showBoundingBox()
default Value.Mutable<Vector3i>
size()
-
Methods inherited from interface org.spongepowered.api.block.entity.BlockEntity
block, copy, createArchetype, isValid, locatableBlock, mirror, mirror, rotate, rotate, setValid, type
-
Methods inherited from interface org.spongepowered.api.data.DataHolder.Mutable
copyFrom, copyFrom, offer, offer, offer, offer, offerAll, offerAll, offerAll, offerAll, offerAll, offerAll, offerSingle, offerSingle, offerSingle, offerSingle, remove, remove, remove, removeAll, removeAll, removeAll, removeAll, removeAll, removeAll, removeKey, removeKey, removeSingle, removeSingle, transform, transform, tryOffer, tryOffer, tryOffer, undo
-
Methods inherited from interface org.spongepowered.api.data.persistence.DataSerializable
contentVersion, toContainer
-
Methods inherited from interface org.spongepowered.api.world.Locatable
blockPosition, location, serverLocation, world
-
Methods inherited from interface org.spongepowered.api.data.SerializableDataHolder
validateRawData
-
Methods inherited from interface org.spongepowered.api.data.SerializableDataHolder.Mutable
setRawData
-
-
-
-
Method Detail
-
mode
default Value.Mutable<StructureMode> mode()
- Returns:
- The structure mode of this structure block.
-
powered
default Value.Mutable<Boolean> powered()
- Returns:
- Whether this structure block is powered.
-
showBoundingBox
default Value.Mutable<Boolean> showBoundingBox()
Keys.STRUCTURE_SHOW_BOUNDING_BOX
In vanilla, this is only visible to
Player
s whoseGameMode
isGameModes.CREATIVE
orGameModes.SPECTATOR
.- Returns:
- Whether the bounding box should be visible.
-
showAir
default Value.Mutable<Boolean> showAir()
- Returns:
- Whether the air within the structure should be visible.
-
ignoreEntities
default Value.Mutable<Boolean> ignoreEntities()
- Returns:
- Whether this structure block should ignore entities.
-
size
default Value.Mutable<Vector3i> size()
- Returns:
- The size of the structure.
-
position
default Value.Mutable<Vector3i> position()
- Returns:
- The position of the structure.
-
seed
default Value.Mutable<Long> seed()
- Returns:
- The seed of the structure to be generated.
-
integrity
default Value.Mutable<Double> integrity()
- Returns:
- The integrity of the structure.
-
author
default Optional<Value.Mutable<String>> author()
- Returns:
- The author of the structure loaded by the structure block.
-
-