Class WarpManager

java.lang.Object
me.iron.WarpSpace.Mod.WarpManager

public class WarpManager
extends java.lang.Object
defines mechanics in warp, hold settings of the warp like its position.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static int minimumSpeed
    minimum speed required to stay in warp
    static int offset
    the offset of warpspace to the realspace sector on the y axis.
    static int scale
    the scale of realspace to warpspace in sectors.
    static int universeSize
    Galaxy size * System size * 64 + Galaxy size * System size * 64 / scale + System size * 2 64 galaxies realspace + 64 galaxies warpspace + 2 systems buffer.
  • Constructor Summary

    Constructors 
    Constructor Description
    WarpManager()  
  • Method Summary

    Modifier and Type Method Description
    static org.schema.common.util.linAlg.Vector3i GetRealSpacePos​(org.schema.common.util.linAlg.Vector3i WarpSpacePos)
    Calculate the realspace position from a warpspace position
    static org.schema.common.util.linAlg.Vector3i GetWarpSpacePos​(org.schema.common.util.linAlg.Vector3i RealSpacePos)
    Calculate the Warpspace position from a realworld position
    static boolean IsInWarp​(org.schema.common.util.linAlg.Vector3i pos)
    check if an objects positon is in warpspace
    static boolean IsInWarp​(org.schema.game.common.controller.SegmentController object)
    check if an objects positon is in warpspace

    Methods inherited from class java.lang.Object

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

    • scale

      public static int scale
      the scale of realspace to warpspace in sectors.
    • universeSize

      public static int universeSize
      Galaxy size * System size * 64 + Galaxy size * System size * 64 / scale + System size * 2 64 galaxies realspace + 64 galaxies warpspace + 2 systems buffer.
    • offset

      public static int offset
      the offset of warpspace to the realspace sector on the y axis. Use a number outside of the galaxy: empty space
    • minimumSpeed

      public static int minimumSpeed
      minimum speed required to stay in warp
  • Constructor Details

  • Method Details

    • IsInWarp

      public static boolean IsInWarp​(org.schema.game.common.controller.SegmentController object)
      check if an objects positon is in warpspace
      Parameters:
      object - segmentcontroller to check
      Returns:
      boolean, true if segmentcontrollers position is in warp
    • IsInWarp

      public static boolean IsInWarp​(org.schema.common.util.linAlg.Vector3i pos)
      check if an objects positon is in warpspace
      Parameters:
      pos - position to check
      Returns:
      boolean, true if position is in warp
    • GetWarpSpacePos

      public static org.schema.common.util.linAlg.Vector3i GetWarpSpacePos​(org.schema.common.util.linAlg.Vector3i RealSpacePos)
      Calculate the Warpspace position from a realworld position
      Parameters:
      RealSpacePos - sector in realspace
      Returns:
      correlating sector in warpspace
    • GetRealSpacePos

      public static org.schema.common.util.linAlg.Vector3i GetRealSpacePos​(org.schema.common.util.linAlg.Vector3i WarpSpacePos)
      Calculate the realspace position from a warpspace position
      Parameters:
      WarpSpacePos - sector in warpspace
      Returns:
      correlating sector in realspace