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 int
minimumSpeed
minimum speed required to stay in warpstatic 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 positionstatic org.schema.common.util.linAlg.Vector3i
GetWarpSpacePos(org.schema.common.util.linAlg.Vector3i RealSpacePos)
Calculate the Warpspace position from a realworld positionstatic boolean
IsInWarp(org.schema.common.util.linAlg.Vector3i pos)
check if an objects positon is in warpspacestatic boolean
IsInWarp(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
-