Class GateControlBlock

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

public class GateControlBlock extends GateStructure
Represents one of the control blocks in a gate structure
  • Constructor Details

    • GateControlBlock

      public GateControlBlock()
      Instantiates a new gate control block container
  • Method Details

    • addPart

      public void addPart(org.bukkit.util.BlockVector blockVector)
      Adds a vector to the list of control blocks
      Parameters:
      blockVector -

      The block vector to add

    • 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