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 DataHolder
DataHolder.Immutable<I>, DataHolder.MutableNested classes/interfaces inherited from interface SerializableDataHolder
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 BlockEntity
block, canTick, copy, createArchetype, isRemoved, isTicking, locatableBlock, mirror, mirror, remove, rotate, rotate, setTicking, typeMethods inherited from interface 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 DataSerializable
contentVersion, toContainer, toViewMethods inherited from interface Locatable
blockPosition, location, serverLocation, worldMethods inherited from interface SerializableDataHolder
validateRawDataMethods inherited from interface SerializableDataHolder.Mutable
setRawDataMethods inherited from interface ValueContainer
get, getDouble, getInt, getKeys, getLong, getOrElse, getOrNull, getValue, getValues, require, requireValue, streamKeys, streamValues, supports, supports
-
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
-
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.
-