Class StructureBlockAbstractImpl<L,V>
java.lang.Object
com.github.shynixn.structureblocklib.core.block.StructureBlockAbstractImpl<L,V>
- All Implemented Interfaces:
com.github.shynixn.structureblocklib.api.block.StructureBlockAbstract,com.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<L>,com.github.shynixn.structureblocklib.api.block.StructureBlockCornerAbstract,com.github.shynixn.structureblocklib.api.block.StructureBlockDataAbstract,com.github.shynixn.structureblocklib.api.block.StructureBlockLoadAbstract<L,,V> com.github.shynixn.structureblocklib.api.block.StructureBlockSaveAbstract<L,V>
public class StructureBlockAbstractImpl<L,V>
extends Object
implements com.github.shynixn.structureblocklib.api.block.StructureBlockDataAbstract, com.github.shynixn.structureblocklib.api.block.StructureBlockSaveAbstract<L,V>, com.github.shynixn.structureblocklib.api.block.StructureBlockLoadAbstract<L,V>
-
Constructor Summary
ConstructorsConstructorDescriptionStructureBlockAbstractImpl(com.github.shynixn.structureblocklib.api.service.ProxyService proxyService, com.github.shynixn.structureblocklib.api.entity.StructureLoaderAbstract<L, V> loader, com.github.shynixn.structureblocklib.api.entity.StructureSaverAbstract<L, V> saver) Creates a new instance with dependencies. -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the author of the structure.@Nullable StringReturns the custom meta data.floatReturns the integrity of the structure.@NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureMirrorReturns the mirrorType of the structure when getting load.@NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureRotationReturns the rotation of the structure when getting load.@Nullable StringReturns the name of the save.longgetSeed()Returns the seed of the structure.intgetSizeX()Returns the size of the structure in X direction.intgetSizeY()Returns the size of the structure in Y direction.intgetSizeZ()Returns the size of the structure in Z direction.Returns the location of the structure.@NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureModeReturns the type of the structureBlock.booleanReturns if the boundingBox is visible.booleanShould entities which may or may not be included in the saved file be included in the loaded/saved structure.booleanReturns if invisibleBlocks are visible.Gets the associatedStructureLoaderAbstractinstance which contains the current block properties.Gets the associatedStructureSaverAbstractinstance which contains the current block properties.voidSets the author of the structure.voidsetBlockNameMetaData(@Nullable String blockNameMetaData) Sets custom meta data.voidsetBoundingBoxVisible(boolean visible) Sets the boundingBoxVisibility.voidsetIncludeEntities(boolean flag) Should entities which may or may not be included in the saved file be included in the loaded/saved structure.voidsetIntegrity(float integrity) Sets the integrity of the structure.voidsetInvisibleBlocksEnabled(boolean flag) Sets if invisibleBlocks should be visible.voidsetMirrorType(@NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureMirror mirrorType) Sets the mirrorType of the structure when getting load.voidsetRotationType(@NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureRotation rotation) Sets the rotation of the structure when getting load.voidsetSaveName(@Nullable String name) Sets the name of the save.voidsetSeed(long seed) Sets the seed of the structure.voidsetSizeX(int sizeX) Changes the size of the structure in X direction.voidsetSizeY(int sizeY) Changes the size of the structure in Y direction.voidsetSizeZ(int sizeZ) Changes the size of the structure in Z direction.voidsetStructureLocation(L location) Changes the location of the structure.voidsetStructureMode(@NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureMode structureMode) Changes the type of the structureBlock.
-
Constructor Details
-
StructureBlockAbstractImpl
public StructureBlockAbstractImpl(com.github.shynixn.structureblocklib.api.service.ProxyService proxyService, com.github.shynixn.structureblocklib.api.entity.StructureLoaderAbstract<L, V> loader, com.github.shynixn.structureblocklib.api.entity.StructureSaverAbstract<L, V> saver) Creates a new instance with dependencies.
-
-
Method Details
-
setStructureMode
public void setStructureMode(@NotNull @NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureMode structureMode) Changes the type of the structureBlock.- Specified by:
setStructureModein interfacecom.github.shynixn.structureblocklib.api.block.StructureBlockAbstract- Parameters:
structureMode- structureMode.
-
getStructureMode
@NotNull public @NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureMode getStructureMode()Returns the type of the structureBlock.- Specified by:
getStructureModein interfacecom.github.shynixn.structureblocklib.api.block.StructureBlockAbstract- Returns:
- structureMode.
-
setMirrorType
public void setMirrorType(@NotNull @NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureMirror mirrorType) Sets the mirrorType of the structure when getting load. -
setRotationType
public void setRotationType(@NotNull @NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureRotation rotation) Sets the rotation of the structure when getting load. -
getRotationType
@NotNull public @NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureRotation getRotationType()Returns the rotation of the structure when getting load. -
getMirrorType
@NotNull public @NotNull com.github.shynixn.structureblocklib.api.enumeration.StructureMirror getMirrorType()Returns the mirrorType of the structure when getting load. -
setBoundingBoxVisible
public void setBoundingBoxVisible(boolean visible) Sets the boundingBoxVisibility. -
isBoundingBoxVisible
public boolean isBoundingBoxVisible()Returns if the boundingBox is visible. -
setIntegrity
public void setIntegrity(float integrity) Sets the integrity of the structure. -
getIntegrity
public float getIntegrity()Returns the integrity of the structure. -
setSeed
public void setSeed(long seed) Sets the seed of the structure. -
getSeed
public long getSeed()Returns the seed of the structure. -
setAuthor
Sets the author of the structure.- Specified by:
setAuthorin interfacecom.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<L>- Parameters:
author- author.
-
getAuthor
Returns the author of the structure.- Specified by:
getAuthorin interfacecom.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<L>- Returns:
- author.
-
setStructureLocation
Changes the location of the structure.- Specified by:
setStructureLocationin interfacecom.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<L>- Parameters:
location- location.
-
getStructureLocation
Returns the location of the structure.- Specified by:
getStructureLocationin interfacecom.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<L>- Returns:
- location.
-
setIncludeEntities
public void setIncludeEntities(boolean flag) Should entities which may or may not be included in the saved file be included in the loaded/saved structure. Default false.- Specified by:
setIncludeEntitiesin interfacecom.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<L>- Parameters:
flag- flag.
-
isIncludeEntitiesEnabled
public boolean isIncludeEntitiesEnabled()Should entities which may or may not be included in the saved file be included in the loaded/saved structure. Default false.- Specified by:
isIncludeEntitiesEnabledin interfacecom.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<L>- Returns:
- false.
-
setSizeX
public void setSizeX(int sizeX) Changes the size of the structure in X direction.- Specified by:
setSizeXin interfacecom.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<L>- Parameters:
sizeX- sizeX.
-
setSizeY
public void setSizeY(int sizeY) Changes the size of the structure in Y direction.- Specified by:
setSizeYin interfacecom.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<L>- Parameters:
sizeY- sizeY.
-
setSizeZ
public void setSizeZ(int sizeZ) Changes the size of the structure in Z direction.- Specified by:
setSizeZin interfacecom.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<L>- Parameters:
sizeZ- sizeZ.
-
getSizeX
public int getSizeX()Returns the size of the structure in X direction.- Specified by:
getSizeXin interfacecom.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<L>- Returns:
- xSize.
-
getSizeY
public int getSizeY()Returns the size of the structure in Y direction.- Specified by:
getSizeYin interfacecom.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<L>- Returns:
- ySize.
-
getSizeZ
public int getSizeZ()Returns the size of the structure in Z direction.- Specified by:
getSizeZin interfacecom.github.shynixn.structureblocklib.api.block.StructureBlockConstructionAbstract<L>- Returns:
- zSize.
-
setSaveName
Sets the name of the save.- Specified by:
setSaveNamein interfacecom.github.shynixn.structureblocklib.api.block.StructureBlockCornerAbstract- Parameters:
name- name.
-
getSaveName
Returns the name of the save.- Specified by:
getSaveNamein interfacecom.github.shynixn.structureblocklib.api.block.StructureBlockCornerAbstract- Returns:
- name.
-
setBlockNameMetaData
Sets custom meta data. Please use the minecraft documentation to find out more.- Specified by:
setBlockNameMetaDatain interfacecom.github.shynixn.structureblocklib.api.block.StructureBlockDataAbstract- Parameters:
blockNameMetaData- customMeta.
-
getBlockNameMetaData
Returns the custom meta data.- Specified by:
getBlockNameMetaDatain interfacecom.github.shynixn.structureblocklib.api.block.StructureBlockDataAbstract- Returns:
- customMeta
-
setInvisibleBlocksEnabled
public void setInvisibleBlocksEnabled(boolean flag) Sets if invisibleBlocks should be visible. -
isInvisibleBlocksEnabled
public boolean isInvisibleBlocksEnabled()Returns if invisibleBlocks are visible. -
saveStructure
@NotNull public @NotNull com.github.shynixn.structureblocklib.api.entity.StructureSaverAbstract<L,V> saveStructure()Gets the associatedStructureSaverAbstractinstance which contains the current block properties. -
loadStructure
@NotNull public @NotNull com.github.shynixn.structureblocklib.api.entity.StructureLoaderAbstract<L,V> loadStructure()Gets the associatedStructureLoaderAbstractinstance which contains the current block properties.
-