Class ShipUtils

java.lang.Object
net.jcm.vsch.util.ShipUtils

public class ShipUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.valkyrienskies.core.api.ships.ServerShip
    assembleBlock(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos blockPos)
    This function IS safe to use in space, but only assembles a single block.
    static org.valkyrienskies.core.api.ships.ServerShip
    assembleBlocks(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos center, int dx, int dy, int dz)
    Warning: This function is still affected by the height bug that other addons have, and so can't be used in space.
    static boolean
    isEntityDraggedByShip(Long id, net.minecraft.world.entity.Entity entity)
     
    static boolean
    isEntityDraggedByShip(org.valkyrienskies.core.api.ships.Ship ship, net.minecraft.world.entity.Entity entity)
     
    static org.valkyrienskies.core.api.ships.properties.ShipTransform
    transformFromId(Long id, org.valkyrienskies.core.apigame.world.ServerShipWorldCore shipWorld)
    Gets the transform of a @link{Ship} when given its id.

    Methods inherited from class java.lang.Object

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

    • ShipUtils

      public ShipUtils()
  • Method Details

    • transformFromId

      public static org.valkyrienskies.core.api.ships.properties.ShipTransform transformFromId(Long id, org.valkyrienskies.core.apigame.world.ServerShipWorldCore shipWorld)
      Gets the transform of a @link{Ship} when given its id.
      Parameters:
      id - Id of the ship (duh)
    • isEntityDraggedByShip

      public static boolean isEntityDraggedByShip(org.valkyrienskies.core.api.ships.Ship ship, net.minecraft.world.entity.Entity entity)
    • isEntityDraggedByShip

      public static boolean isEntityDraggedByShip(Long id, net.minecraft.world.entity.Entity entity)
    • assembleBlocks

      public static org.valkyrienskies.core.api.ships.ServerShip assembleBlocks(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos center, int dx, int dy, int dz)
      Warning: This function is still affected by the height bug that other addons have, and so can't be used in space.

      dx, dy and dz Are the distance from center block to be assembled. Added in both directions, so (center.x - dx) ... (center.x + dx).
      Returns:
      The ship that was created, or null if it wasn't created
      See Also:
    • assembleBlock

      public static org.valkyrienskies.core.api.ships.ServerShip assembleBlock(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos blockPos)
      This function IS safe to use in space, but only assembles a single block.
      Returns:
      The ship that was created, or null if it wasn't created
      See Also: