Class PylonUtils
-
- All Implemented Interfaces:
public final class PylonUtils
-
-
Method Summary
Modifier and Type Method Description final static Boolean
isFromAddon(NamespacedKey $self, PylonAddon addon)
final static BlockFace
vectorToBlockFace(Vector3i vector)
Converts an approximate orthogonal vector to a BlockFace final static BlockFace
vectorToBlockFace(Vector3f vector)
final static BlockFace
vectorToBlockFace(Vector vector)
final static BlockFace
rotateToPlayerFacing(Player player, BlockFace face, Boolean allowVertical)
Rotates a BlockFace to the player's reference frame. final static Boolean
isCardinalDirection(Vector3i vector)
final static Boolean
isCardinalDirection(Vector3f vector)
final static PylonAddon
getAddon(NamespacedKey key)
final static Vector3i
rotateVectorToFace(Vector3i vector, BlockFace face)
Rotates a vector to face a directionThe direction given must be a horizontal cardinal direction (north, east, south, west)Assumes north to be the default direction (supplying north will result in no rotation) final static List<String>
wrapText(String text, Integer limit)
final static Component
attachArguments(Component $self, List<TranslationArgumentLike> args)
Attaches arguments to a component and all its children. final static PylonRecipe
findRecipeFor(PylonItem item)
final static PylonRecipe
findRecipeFor(PylonFluid fluid)
final static Boolean
isFakeEvent(Event event)
-
-
Method Detail
-
isFromAddon
final static Boolean isFromAddon(NamespacedKey $self, PylonAddon addon)
-
vectorToBlockFace
final static BlockFace vectorToBlockFace(Vector3i vector)
Converts an approximate orthogonal vector to a BlockFace
-
vectorToBlockFace
final static BlockFace vectorToBlockFace(Vector3f vector)
-
vectorToBlockFace
final static BlockFace vectorToBlockFace(Vector vector)
-
rotateToPlayerFacing
final static BlockFace rotateToPlayerFacing(Player player, BlockFace face, Boolean allowVertical)
Rotates a BlockFace to the player's reference frame. Where the player is facing becomes NORTH.
-
isCardinalDirection
final static Boolean isCardinalDirection(Vector3i vector)
-
isCardinalDirection
final static Boolean isCardinalDirection(Vector3f vector)
-
getAddon
final static PylonAddon getAddon(NamespacedKey key)
-
rotateVectorToFace
final static Vector3i rotateVectorToFace(Vector3i vector, BlockFace face)
Rotates a vector to face a direction
The direction given must be a horizontal cardinal direction (north, east, south, west)
Assumes north to be the default direction (supplying north will result in no rotation)
-
attachArguments
final static Component attachArguments(Component $self, List<TranslationArgumentLike> args)
Attaches arguments to a component and all its children.
-
findRecipeFor
final static PylonRecipe findRecipeFor(PylonItem item)
-
findRecipeFor
final static PylonRecipe findRecipeFor(PylonFluid fluid)
-
isFakeEvent
final static Boolean isFakeEvent(Event event)
-
-
-
-