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.MutableNested 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, canTick, copy, createArchetype, isRemoved, isTicking, locatableBlock, mirror, mirror, remove, rotate, rotate, setTicking, typeMethods 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, undoMethods inherited from interface org.spongepowered.api.data.persistence.DataSerializable
contentVersion, toContainerMethods inherited from interface org.spongepowered.api.world.Locatable
blockPosition, location, serverLocation, worldMethods inherited from interface org.spongepowered.api.data.SerializableDataHolder
validateRawDataMethods 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_BOXIn vanilla, this is only visible to
Players whoseGameModeisGameModes.CREATIVEorGameModes.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.
-