Package net.jcm.vsch.util
Class ShipUtils
java.lang.Object
net.jcm.vsch.util.ShipUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.valkyrienskies.core.api.ships.ServerShipassembleBlock(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.ServerShipassembleBlocks(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 booleanisEntityDraggedByShip(Long id, net.minecraft.world.entity.Entity entity) static booleanisEntityDraggedByShip(org.valkyrienskies.core.api.ships.Ship ship, net.minecraft.world.entity.Entity entity) static org.valkyrienskies.core.api.ships.properties.ShipTransformtransformFromId(Long id, org.valkyrienskies.core.apigame.world.ServerShipWorldCore shipWorld) Gets the transform of a @link{Ship} when given its id.
-
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
-
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,dyanddzAre 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:
-