Class StructurePlaceMetaImpl
java.lang.Object
com.github.shynixn.structureblocklib.core.entity.StructurePlaceMetaImpl
- All Implemented Interfaces:
com.github.shynixn.structureblocklib.api.entity.StructurePlaceMeta
public class StructurePlaceMetaImpl
extends Object
implements com.github.shynixn.structureblocklib.api.entity.StructurePlaceMeta
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanfloatcom.github.shynixn.structureblocklib.api.entity.Positioncom.github.shynixn.structureblocklib.api.enumeration.StructureMirrorcom.github.shynixn.structureblocklib.api.enumeration.StructureRotationlong -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatGets the target integrity.@NotNull com.github.shynixn.structureblocklib.api.entity.PositionGets the source Location.com.github.shynixn.structureblocklib.api.enumeration.StructureMirrorGets the target mirror type.com.github.shynixn.structureblocklib.api.enumeration.StructureRotationGets the target rotation type.longgetSeed()Gets the target seed.booleanShould entities be loaded.
-
Field Details
-
location
public com.github.shynixn.structureblocklib.api.entity.Position location -
includeEntities
public boolean includeEntities -
rotation
public com.github.shynixn.structureblocklib.api.enumeration.StructureRotation rotation -
mirror
public com.github.shynixn.structureblocklib.api.enumeration.StructureMirror mirror -
integrity
public float integrity -
seed
public long seed
-
-
Constructor Details
-
StructurePlaceMetaImpl
public StructurePlaceMetaImpl()
-
-
Method Details
-
isIncludeEntitiesEnabled
public boolean isIncludeEntitiesEnabled()Should entities be loaded. Default false.- Specified by:
isIncludeEntitiesEnabledin interfacecom.github.shynixn.structureblocklib.api.entity.StructurePlaceMeta- Returns:
- flag.
-
getMirrorType
public com.github.shynixn.structureblocklib.api.enumeration.StructureMirror getMirrorType()Gets the target mirror type. Default StructureMirror.NONE.- Specified by:
getMirrorTypein interfacecom.github.shynixn.structureblocklib.api.entity.StructurePlaceMeta- Returns:
StructureMirror.
-
getRotationType
public com.github.shynixn.structureblocklib.api.enumeration.StructureRotation getRotationType()Gets the target rotation type. Default StructureRotation.NONE.- Specified by:
getRotationTypein interfacecom.github.shynixn.structureblocklib.api.entity.StructurePlaceMeta- Returns:
StructureRotation.
-
getIntegrity
public float getIntegrity()Gets the target integrity. Default 1.0. 1.0 -> Every block which is present in the structure file is placed in the world. smaller 1.0 -> Blocks get randomly removed by loading depending on the givengetSeed.- Specified by:
getIntegrityin interfacecom.github.shynixn.structureblocklib.api.entity.StructurePlaceMeta- Returns:
- integrity.
-
getSeed
public long getSeed()Gets the target seed. Default 0L. The seed is used to randomly remove blocks if the integritygetIntegrityis less than 1.0.- Specified by:
getSeedin interfacecom.github.shynixn.structureblocklib.api.entity.StructurePlaceMeta- Returns:
- seed.
-
getLocation
@NotNull public @NotNull com.github.shynixn.structureblocklib.api.entity.Position getLocation()Gets the source Location.- Specified by:
getLocationin interfacecom.github.shynixn.structureblocklib.api.entity.StructurePlaceMeta- Returns:
- location.
-