Interface StructureBlock
- All Superinterfaces:
BlockEntity
,CopyableDataHolder
,DataHolder
,DataHolder.Mutable
,DataSerializable
,Locatable
,SerializableDataHolder
,SerializableDataHolder.Mutable
,ValueContainer
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
Modifier and TypeMethodDescriptiondefault Optional
<Value.Mutable<String>> author()
default Value.Mutable
<Boolean> default Value.Mutable
<Double> 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> default Value.Mutable
<Vector3i> size()
Methods inherited from interface org.spongepowered.api.block.entity.BlockEntity
block, copy, createArchetype, isRemoved, locatableBlock, mirror, mirror, remove, rotate, rotate, 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 Details
-
mode
- Returns:
- The structure mode of this structure block.
-
powered
- Returns:
- Whether this structure block is powered.
-
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
- Returns:
- Whether the air within the structure should be visible.
-
ignoreEntities
- Returns:
- Whether this structure block should ignore entities.
-
size
- Returns:
- The size of the structure.
-
position
- Returns:
- The position of the structure.
-
seed
- Returns:
- The seed of the structure to be generated.
-
integrity
- Returns:
- The integrity of the structure.
-
author
- Returns:
- The author of the structure loaded by the structure block.
-