public class CraftStructureBlock
extends org.bukkit.craftbukkit.v1_16_R1.block.CraftBlockState
implements com.github.shynixn.structureblocklib.api.bukkit.block.StructureBlockData, com.github.shynixn.structureblocklib.api.bukkit.block.StructureBlockSave, com.github.shynixn.structureblocklib.api.bukkit.block.StructureBlockLoad
| Modifier and Type | Field and Description |
|---|---|
com.github.shynixn.structureblocklib.api.service.TypeConversionService |
conversionService |
com.github.shynixn.structureblocklib.core.block.StructureBlockAbstractImpl<org.bukkit.Location,org.bukkit.util.Vector> |
internalBlock |
net.minecraft.server.v1_16_R1.TileEntityStructure |
tileEntityStructure |
| Constructor and Description |
|---|
CraftStructureBlock(com.github.shynixn.structureblocklib.core.block.StructureBlockAbstractImpl<org.bukkit.Location,org.bukkit.util.Vector> structure,
com.github.shynixn.structureblocklib.api.service.TypeConversionService conversionService,
org.bukkit.block.Block block)
Creates a new instance with dependencies.
|
| Modifier and Type | Method and Description |
|---|---|
@Nullable java.lang.String |
getAuthor()
Returns the author of the structure.
|
@Nullable java.lang.String |
getBlockNameMetaData()
Returns the custom meta data.
|
float |
getIntegrity()
Returns the integrity of the structure.
|
@NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureMirror |
getMirrorType()
Returns the mirrorType of the structure when getting load.
|
@NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureRotation |
getRotationType()
Returns the rotation of the structure when getting load.
|
@Nullable java.lang.String |
getSaveName()
Returns the name of the save.
|
long |
getSeed()
Returns the seed of the structure.
|
int |
getSizeX()
Returns the size of the structure in X direction.
|
int |
getSizeY()
Returns the size of the structure in Y direction.
|
int |
getSizeZ()
Returns the size of the structure in Z direction.
|
@Nullable org.bukkit.Location |
getStructureLocation()
Returns the location of the structure.
|
@NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureMode |
getStructureMode()
Returns the type of the structureBlock.
|
boolean |
isBoundingBoxVisible()
Returns if the boundingBox is visible.
|
boolean |
isIncludeEntitiesEnabled()
Should entities which may or may not be included in the
saved file be included in the loaded/saved structure.
|
boolean |
isInvisibleBlocksEnabled()
Returns if invisibleBlocks are visible.
|
@NotNull com.github.shynixn.structureblocklib.api.entity.StructureLoaderAbstract<org.bukkit.Location,org.bukkit.util.Vector> |
loadStructure()
Creates a new instance of
StructureLoaderAbstract which
contains the current block properties. |
@NotNull com.github.shynixn.structureblocklib.api.entity.StructureSaverAbstract<org.bukkit.Location,org.bukkit.util.Vector> |
saveStructure()
Creates a new instance of
StructureSaverAbstract which
contains the current block properties. |
void |
setAuthor(@Nullable java.lang.String author)
Sets the author of the structure.
|
void |
setBlockNameMetaData(@Nullable java.lang.String blockNameMetaData)
Sets custom meta data.
|
void |
setBoundingBoxVisible(boolean visible)
Sets the boundingBoxVisibility.
|
void |
setIncludeEntities(boolean flag)
Should entities which may or may not be included in the
saved file be included in the loaded/saved structure.
|
void |
setIntegrity(float integrity)
Sets the integrity of the structure.
|
void |
setInvisibleBlocksEnabled(boolean flag)
Sets if invisibleBlocks should be visible.
|
void |
setMirrorType(@NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureMirror mirrorType)
Sets the mirrorType of the structure when getting load.
|
void |
setRotationType(@NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureRotation rotation)
Sets the rotation of the structure when getting load.
|
void |
setSaveName(@Nullable java.lang.String name)
Sets the name of the save.
|
void |
setSeed(long seed)
Sets the seed of the structure.
|
void |
setSizeX(int sizeX)
Changes the size of the structure in X direction.
|
void |
setSizeY(int sizeY)
Changes the size of the structure in Y direction.
|
void |
setSizeZ(int sizeZ)
Changes the size of the structure in Z direction.
|
void |
setStructureLocation(@Nullable org.bukkit.Location location)
Changes the location of the structure.
|
void |
setStructureMode(@NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureMode structureMode)
Changes the type of the structureBlock.
|
boolean |
update(boolean force,
boolean applyPhysics)
Updates the craft changes to the minecraft world.
|
equals, getBlock, getBlockData, getBlockState, getBlockState, getChunk, getData, getFlag, getHandle, getLightLevel, getLocation, getLocation, getMetadata, getPosition, getRawData, getType, getWorld, getX, getY, getZ, hashCode, hasMetadata, isPlaced, removeMetadata, requirePlaced, setBlockData, setData, setData, setFlag, setMetadata, setRawData, setType, update, updateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitpublic com.github.shynixn.structureblocklib.core.block.StructureBlockAbstractImpl<org.bukkit.Location,org.bukkit.util.Vector> internalBlock
public com.github.shynixn.structureblocklib.api.service.TypeConversionService conversionService
public net.minecraft.server.v1_16_R1.TileEntityStructure tileEntityStructure
public CraftStructureBlock(com.github.shynixn.structureblocklib.core.block.StructureBlockAbstractImpl<org.bukkit.Location,org.bukkit.util.Vector> structure,
com.github.shynixn.structureblocklib.api.service.TypeConversionService conversionService,
org.bukkit.block.Block block)
structure - dependency.block - dependency.public boolean update(boolean force,
boolean applyPhysics)
update in interface org.bukkit.block.BlockStateupdate in class org.bukkit.craftbukkit.v1_16_R1.block.CraftBlockStateforce - force update.applyPhysics - apply physics.public void setMirrorType(@NotNull
@NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureMirror mirrorType)
setMirrorType in interface com.github.shynixn.structureblocklib.api.block.StructureBlockLoadAbstract<org.bukkit.Location,org.bukkit.util.Vector>mirrorType - mirrorType.public void setRotationType(@NotNull
@NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureRotation rotation)
setRotationType in interface com.github.shynixn.structureblocklib.api.block.StructureBlockLoadAbstract<org.bukkit.Location,org.bukkit.util.Vector>rotation - rotation.@NotNull public @NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureRotation getRotationType()
getRotationType in interface com.github.shynixn.structureblocklib.api.block.StructureBlockLoadAbstract<org.bukkit.Location,org.bukkit.util.Vector>@NotNull public @NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureMirror getMirrorType()
getMirrorType in interface com.github.shynixn.structureblocklib.api.block.StructureBlockLoadAbstract<org.bukkit.Location,org.bukkit.util.Vector>public void setBoundingBoxVisible(boolean visible)
setBoundingBoxVisible in interface com.github.shynixn.structureblocklib.api.block.StructureBlockLoadAbstract<org.bukkit.Location,org.bukkit.util.Vector>visible - visible.public boolean isBoundingBoxVisible()
isBoundingBoxVisible in interface com.github.shynixn.structureblocklib.api.block.StructureBlockLoadAbstract<org.bukkit.Location,org.bukkit.util.Vector>public void setIntegrity(float integrity)
setIntegrity in interface com.github.shynixn.structureblocklib.api.block.StructureBlockLoadAbstract<org.bukkit.Location,org.bukkit.util.Vector>integrity - integrity.public float getIntegrity()
getIntegrity in interface com.github.shynixn.structureblocklib.api.block.StructureBlockLoadAbstract<org.bukkit.Location,org.bukkit.util.Vector>public void setSeed(long seed)
setSeed in interface com.github.shynixn.structureblocklib.api.block.StructureBlockLoadAbstract<org.bukkit.Location,org.bukkit.util.Vector>seed - seed.public long getSeed()
getSeed in interface com.github.shynixn.structureblocklib.api.block.StructureBlockLoadAbstract<org.bukkit.Location,org.bukkit.util.Vector>public void setAuthor(@Nullable
@Nullable java.lang.String author)
setAuthor in interface com.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<org.bukkit.Location>author - author.@Nullable public @Nullable java.lang.String getAuthor()
getAuthor in interface com.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<org.bukkit.Location>public void setStructureLocation(@Nullable
@Nullable org.bukkit.Location location)
setStructureLocation in interface com.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<org.bukkit.Location>location - location.@Nullable public @Nullable org.bukkit.Location getStructureLocation()
getStructureLocation in interface com.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<org.bukkit.Location>public void setIncludeEntities(boolean flag)
setIncludeEntities in interface com.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<org.bukkit.Location>flag - flag.public boolean isIncludeEntitiesEnabled()
isIncludeEntitiesEnabled in interface com.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<org.bukkit.Location>public void setSizeX(int sizeX)
setSizeX in interface com.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<org.bukkit.Location>sizeX - sizeX.public void setSizeY(int sizeY)
setSizeY in interface com.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<org.bukkit.Location>sizeY - sizeY.public void setSizeZ(int sizeZ)
setSizeZ in interface com.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<org.bukkit.Location>sizeZ - sizeZ.public int getSizeX()
getSizeX in interface com.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<org.bukkit.Location>public int getSizeY()
getSizeY in interface com.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<org.bukkit.Location>public int getSizeZ()
getSizeZ in interface com.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<org.bukkit.Location>public void setSaveName(@Nullable
@Nullable java.lang.String name)
setSaveName in interface com.github.shynixn.structureblocklib.api.block.StructureBlockCornerAbstractname - name.@Nullable public @Nullable java.lang.String getSaveName()
getSaveName in interface com.github.shynixn.structureblocklib.api.block.StructureBlockCornerAbstractpublic void setBlockNameMetaData(@Nullable
@Nullable java.lang.String blockNameMetaData)
setBlockNameMetaData in interface com.github.shynixn.structureblocklib.api.block.StructureBlockDataAbstractblockNameMetaData - customMeta.@Nullable public @Nullable java.lang.String getBlockNameMetaData()
getBlockNameMetaData in interface com.github.shynixn.structureblocklib.api.block.StructureBlockDataAbstractpublic void setInvisibleBlocksEnabled(boolean flag)
setInvisibleBlocksEnabled in interface com.github.shynixn.structureblocklib.api.block.StructureBlockSaveAbstract<org.bukkit.Location,org.bukkit.util.Vector>flag - flag.public boolean isInvisibleBlocksEnabled()
isInvisibleBlocksEnabled in interface com.github.shynixn.structureblocklib.api.block.StructureBlockSaveAbstract<org.bukkit.Location,org.bukkit.util.Vector>public void setStructureMode(@NotNull
@NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureMode structureMode)
setStructureMode in interface com.github.shynixn.structureblocklib.api.block.StructureBlockAbstractstructureMode - structureMode.@NotNull public @NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureMode getStructureMode()
getStructureMode in interface com.github.shynixn.structureblocklib.api.block.StructureBlockAbstract@NotNull public @NotNull com.github.shynixn.structureblocklib.api.entity.StructureLoaderAbstract<org.bukkit.Location,org.bukkit.util.Vector> loadStructure()
StructureLoaderAbstract which
contains the current block properties.loadStructure in interface com.github.shynixn.structureblocklib.api.block.StructureBlockLoadAbstract<org.bukkit.Location,org.bukkit.util.Vector>@NotNull public @NotNull com.github.shynixn.structureblocklib.api.entity.StructureSaverAbstract<org.bukkit.Location,org.bukkit.util.Vector> saveStructure()
StructureSaverAbstract which
contains the current block properties.saveStructure in interface com.github.shynixn.structureblocklib.api.block.StructureBlockSaveAbstract<org.bukkit.Location,org.bukkit.util.Vector>