Package me.iron.WarpSpace.Mod
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 intminimumSpeedminimum speed required to stay in warpstatic intoffsetthe offset of warpspace to the realspace sector on the y axis.static intscalethe scale of realspace to warpspace in sectors.static intuniverseSizeGalaxy 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.Vector3iGetRealSpacePos(org.schema.common.util.linAlg.Vector3i WarpSpacePos)Calculate the realspace position from a warpspace positionstatic org.schema.common.util.linAlg.Vector3iGetWarpSpacePos(org.schema.common.util.linAlg.Vector3i RealSpacePos)Calculate the Warpspace position from a realworld positionstatic booleanIsInWarp(org.schema.common.util.linAlg.Vector3i pos)check if an objects positon is in warpspacestatic booleanIsInWarp(org.schema.game.common.controller.SegmentController object)check if an objects positon is in warpspace
-
Field Details
-
scale
public static int scalethe scale of realspace to warpspace in sectors. -
universeSize
public static int universeSizeGalaxy 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 offsetthe offset of warpspace to the realspace sector on the y axis. Use a number outside of the galaxy: empty space -
minimumSpeed
public static int minimumSpeedminimum speed required to stay in warp
-
-
Constructor Details
-
WarpManager
public WarpManager()
-
-
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
-