BlockState
, Metadatable
public interface Structure extends BlockState
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
getAuthor() |
Get the name of who created this structure.
|
float |
getIntegrity() |
Get the integrity of this structure.
|
java.lang.String |
getMetadata() |
Get the metadata function this structure block will perform when
activated.
|
Mirror |
getMirror() |
How this structure is mirrored.
|
BlockVector |
getRelativePosition() |
The relative position of the structure outline based on the position of
the structure block.
|
StructureRotation |
getRotation() |
Get how this structure is rotated.
|
long |
getSeed() |
The seed used to determine how many blocks are removed upon loading of
this structure.
|
java.lang.String |
getStructureName() |
The name of this structure.
|
BlockVector |
getStructureSize() |
The distance to the opposite corner of this structure.
|
UsageMode |
getUsageMode() |
Get the
UsageMode of this structure block. |
boolean |
isBoundingBoxVisible() |
Get if this structure block is currently showing the bounding box.
|
boolean |
isIgnoreEntities() |
Get if this structure block should ignore entities.
|
boolean |
isShowAir() |
Check if this structure block is currently showing all air blocks
|
void |
setAuthor(java.lang.String author) |
Set the name of whoever created this structure.
|
void |
setAuthor(LivingEntity livingEntity) |
Set the name of whoever created this structure using a
LivingEntity . |
void |
setBoundingBoxVisible(boolean showBoundingBox) |
Set if this structure box should show the bounding box.
|
void |
setIgnoreEntities(boolean ignoreEntities) |
While in
UsageMode.SAVE mode, this will ignore any entities when
saving the structure. |
void |
setIntegrity(float integrity) |
Set the integrity of the structure.
|
void |
setMetadata(java.lang.String metadata) |
Only applicable while in
UsageMode.DATA . |
void |
setMirror(Mirror mirror) |
Sets the mirroring of the structure.
|
void |
setRelativePosition(BlockVector vector) |
Set the relative position from the structure block.
|
void |
setRotation(StructureRotation rotation) |
Set how this structure is rotated.
|
void |
setSeed(long seed) |
The seed used to determine which blocks will be removed upon loading.
|
void |
setShowAir(boolean showAir) |
Set if the structure outline should show air blocks.
|
void |
setStructureName(java.lang.String name) |
Set the name of this structure.
|
void |
setStructureSize(BlockVector vector) |
Set the maximum size of this structure from the origin point.
|
void |
setUsageMode(UsageMode mode) |
Set the
UsageMode of this structure block. |
getBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isPlaced, setBlockData, setData, setRawData, setType, update, update, update
getMetadata, hasMetadata, removeMetadata, setMetadata
java.lang.String getStructureName()
void setStructureName(java.lang.String name)
UsageMode.SAVE
structure block MUST match the
name within the UsageMode.CORNER
block or the size calculation
will fail.name
- the case-sensitive name of this structurejava.lang.String getAuthor()
void setAuthor(java.lang.String author)
author
- whoever created this structurevoid setAuthor(LivingEntity livingEntity)
LivingEntity
.livingEntity
- the entity who created this structureBlockVector getRelativePosition()
void setRelativePosition(BlockVector vector)
vector
- the BlockVector
containing the relative origin
coordinates of this structure.BlockVector getStructureSize()
BlockVector
which contains the total size of the
structure.void setStructureSize(BlockVector vector)
vector
- the BlockVector
containing the size of this
structure, based off of the origin coordinates.void setMirror(Mirror mirror)
mirror
- the new mirroring methodMirror getMirror()
void setRotation(StructureRotation rotation)
rotation
- the new rotationStructureRotation getRotation()
void setUsageMode(UsageMode mode)
UsageMode
of this structure block.mode
- the new mode to set.UsageMode getUsageMode()
UsageMode
of this structure block.void setIgnoreEntities(boolean ignoreEntities)
UsageMode.SAVE
mode, this will ignore any entities when
saving the structure.
UsageMode.LOAD
mode this will ignore any entities that
were saved to file.ignoreEntities
- the flag to setboolean isIgnoreEntities()
UsageMode
should ignore entities.void setShowAir(boolean showAir)
showAir
- if the structure block should show air blocksboolean isShowAir()
void setBoundingBoxVisible(boolean showBoundingBox)
showBoundingBox
- if the structure box should be shownboolean isBoundingBoxVisible()
void setIntegrity(float integrity)
getSeed()
are used together
to determine which blocks are randomly removed to mimic "decay."integrity
- the integrity of this structurefloat getIntegrity()
void setSeed(long seed)
getIntegrity()
and seed are used together to determine which
blocks are randomly removed to mimic "decay."seed
- the seed used to determine how many blocks will be removedlong getSeed()
void setMetadata(java.lang.String metadata)
UsageMode.DATA
. Metadata are specific
functions that can be applied to the structure location. Consult the
Minecraft
wiki for more information.metadata
- the function to perform on the selected locationjava.lang.String getMetadata()
Copyright © 2018. All rights reserved.