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

    Fields
    Modifier and Type
    Field
    Description
    boolean
     
    float
     
    com.github.shynixn.structureblocklib.api.entity.Position
     
    com.github.shynixn.structureblocklib.api.enumeration.StructureMirror
     
    com.github.shynixn.structureblocklib.api.enumeration.StructureRotation
     
    long
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Gets the target integrity.
    @NotNull com.github.shynixn.structureblocklib.api.entity.Position
    Gets the source Location.
    com.github.shynixn.structureblocklib.api.enumeration.StructureMirror
    Gets the target mirror type.
    com.github.shynixn.structureblocklib.api.enumeration.StructureRotation
    Gets the target rotation type.
    long
    Gets the target seed.
    boolean
    Should entities be loaded.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      isIncludeEntitiesEnabled in interface com.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:
      getMirrorType in interface com.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:
      getRotationType in interface com.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 given getSeed.
      Specified by:
      getIntegrity in interface com.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 integrity getIntegrity is less than 1.0.
      Specified by:
      getSeed in interface com.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:
      getLocation in interface com.github.shynixn.structureblocklib.api.entity.StructurePlaceMeta
      Returns:
      location.