Class GateFrame

java.lang.Object
org.sgrewritten.stargate.api.gate.structure.GateStructure
org.sgrewritten.stargate.gate.structure.GateFrame

public class GateFrame extends GateStructure
Represents the frame part of the gate structure
  • Constructor Summary

    Constructors
    Constructor
    Description
    Instantiates a new gate frame
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addPart(org.bukkit.util.BlockVector blockVector, Set<org.bukkit.Material> materials)
    Adds a block to this gate frame
    void
    generateStructure(VectorOperation converter, org.bukkit.Location topLeft)
    Generate the structure from format
    org.bukkit.util.BoundingBox
     
    List<org.bukkit.util.BlockVector>
    Gets all positions, represented by block vectors, where this structure type is used
    protected boolean
    isValidBlock(org.bukkit.util.BlockVector blockVector, org.bukkit.Material material)
    Checks if a block in the built portal matches the block in this structure

    Methods inherited from class org.sgrewritten.stargate.api.gate.structure.GateStructure

    isValidState

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GateFrame

      public GateFrame()
      Instantiates a new gate frame
  • Method Details

    • addPart

      public void addPart(org.bukkit.util.BlockVector blockVector, Set<org.bukkit.Material> materials)
      Adds a block to this gate frame
      Parameters:
      blockVector -

      The block vector describing the location of the block

      materials -

      The usable materials for the block

    • getStructureTypePositions

      public List<org.bukkit.util.BlockVector> getStructureTypePositions()
      Description copied from class: GateStructure
      Gets all positions, represented by block vectors, where this structure type is used
      Specified by:
      getStructureTypePositions in class GateStructure
      Returns:

      All positions where this structure type is used

    • isValidBlock

      protected boolean isValidBlock(org.bukkit.util.BlockVector blockVector, org.bukkit.Material material)
      Description copied from class: GateStructure
      Checks if a block in the built portal matches the block in this structure
      Specified by:
      isValidBlock in class GateStructure
      Parameters:
      blockVector -

      The position of the block to check

      material -

      The material found in the built portal

      Returns:

      True if the material matches

    • generateStructure

      public void generateStructure(VectorOperation converter, org.bukkit.Location topLeft)
      Description copied from class: GateStructure
      Generate the structure from format
      Specified by:
      generateStructure in class GateStructure
      Parameters:
      converter -

      Conversion between real space and format space

      topLeft -

      Top left corner in real space

    • getBoundingBox

      public org.bukkit.util.BoundingBox getBoundingBox()
      Specified by:
      getBoundingBox in class GateStructure
      Returns:

      The smallest box wherein this gate fits