Class BlockHelper

java.lang.Object
team.lodestar.lodestone.helpers.BlockHelper

public class BlockHelper extends Object
A collection of various helper methods related to all your blocky needs.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.world.phys.Vec3
    fromBlockPos(net.minecraft.core.BlockPos pos)
    Converts a block position into a Vec3 entry.
    static <T> Collection<T>
    getBlockEntities(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int range)
    Returns a list of block entities within a radius around a position.
    static <T> Collection<T>
    getBlockEntities(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x, int z)
    Returns a list of block entities within an XZ radius around a position.
    static <T> Collection<T>
    getBlockEntities(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x, int y, int z)
    Returns a list of block entities within an XYZ radius around a position.
    static <T> Collection<T>
    getBlockEntities(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x1, int y1, int z1, int x2, int y2, int z2)
    Returns a list of block entities within set coordinates.
    static <T> Collection<T>
    getBlockEntities(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x, int y, int z, Predicate<T> predicate)
    Returns a list of block entities within an XYZ range, with a predicate for conditional checks.
    static <T> Collection<T>
    getBlockEntities(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x, int z, Predicate<T> predicate)
    Returns a list of block entities within an XZ range, with a predicate for conditional checks.
    static <T> Collection<T>
    getBlockEntities(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int range, Predicate<T> predicate)
    Returns a list of block entities within a range, with a predicate for conditional checks.
    static <T> Collection<T>
    getBlockEntities(Class<T> type, net.minecraft.world.level.Level world, net.minecraft.world.phys.AABB bb)
    Returns a list of block entities within an AABB.
    static <T> Stream<T>
    getBlockEntitiesStream(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int range)
    Returns a list of block entities within a radius around a position, as stream
    static <T> Stream<T>
    getBlockEntitiesStream(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x, int z)
    Returns a list of block entities within an XZ radius around a position, as stream
    static <T> Stream<T>
    getBlockEntitiesStream(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x, int y, int z)
    Returns a list of block entities within an XYZ radius around a position, as stream
    static <T> Stream<T>
    getBlockEntitiesStream(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x1, int y1, int z1, int x2, int y2, int z2)
    Returns a list of block entities within set coordinates, as stream
    static <T> Stream<T>
    getBlockEntitiesStream(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x, int y, int z, Predicate<T> predicate)
    Returns a list of block entities within an XYZ range, with a predicate for conditional checks, as streamq
    static <T> Stream<T>
    getBlockEntitiesStream(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x, int z, Predicate<T> predicate)
    Returns a list of block entities within an XZ range, with a predicate for conditional checks, as stream
    static <T> Stream<T>
    getBlockEntitiesStream(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int range, Predicate<T> predicate)
    Returns a list of block entities within a range, with a predicate for conditional checks, as stream
    static <T> Stream<T>
    getBlockEntitiesStream(Class<T> type, net.minecraft.world.level.Level world, net.minecraft.world.phys.AABB bb)
    Returns a list of block entities within an AABB, as stream
    static Collection<net.minecraft.core.BlockPos>
    getBlocks(net.minecraft.core.BlockPos pos, int x, int y, int z)
    Returns a list of block positions within a XYZ radius around a position.
    static Collection<net.minecraft.core.BlockPos>
    getBlocks(net.minecraft.core.BlockPos pos, int x1, int y1, int z1, int x2, int y2, int z2)
    Returns a list of block positions within set coordinates.
    static Collection<net.minecraft.core.BlockPos>
    getBlocks(net.minecraft.core.BlockPos pos, int x, int y, int z, Predicate<net.minecraft.core.BlockPos> predicate)
    Returns a list of block positions within a XYZ radius around a position, with a predicate for conditional checks.
    static Collection<net.minecraft.core.BlockPos>
    getBlocks(net.minecraft.core.BlockPos pos, int range, Predicate<net.minecraft.core.BlockPos> predicate)
    Returns a list of block positions within a radius around a position, with a predicate for conditional checks.
    static Stream<net.minecraft.core.BlockPos>
    getBlocksStream(net.minecraft.core.BlockPos pos, int x, int y, int z)
    Returns a list of block positions within a XYZ radius around a position, as stream
    static Stream<net.minecraft.core.BlockPos>
    getBlocksStream(net.minecraft.core.BlockPos pos, int x1, int y1, int z1, int x2, int y2, int z2)
    Returns a list of block positions within set coordinates, as stream
    static Stream<net.minecraft.core.BlockPos>
    getBlocksStream(net.minecraft.core.BlockPos pos, int x, int y, int z, Predicate<net.minecraft.core.BlockPos> predicate)
    Returns a list of block positions within a XYZ radius around a position, with a predicate for conditional checks, as stream
    static Stream<net.minecraft.core.BlockPos>
    getBlocksStream(net.minecraft.core.BlockPos pos, int range, Predicate<net.minecraft.core.BlockPos> predicate)
    Returns a list of block positions within a radius around a position, with a predicate for conditional checks, as stream
    static net.minecraft.world.level.block.state.BlockState
    getBlockStateWithExistingProperties(net.minecraft.world.level.block.state.BlockState oldState, net.minecraft.world.level.block.state.BlockState newState)
    Copies all properties from oldState to newState, given that an individual property exists on the newState.
    static Collection<net.minecraft.core.BlockPos>
    getNeighboringBlocks(net.minecraft.core.BlockPos current)
    Quick method to get all blocks neighboring a block.
    static Stream<net.minecraft.core.BlockPos>
    getNeighboringBlocksStream(net.minecraft.core.BlockPos current)
    Quick method to get all blocks neighboring a block, as stream.
    static Collection<net.minecraft.core.BlockPos>
    getPath(net.minecraft.core.BlockPos start, net.minecraft.core.BlockPos end, int speed, boolean inclusive, net.minecraft.world.level.Level level)
     
    static Collection<net.minecraft.core.BlockPos>
    getPlaneOfBlocks(net.minecraft.core.BlockPos pos, int x, int z)
     
    static Collection<net.minecraft.core.BlockPos>
    getPlaneOfBlocks(net.minecraft.core.BlockPos pos, int x1, int z1, int x2, int z2)
     
    static Collection<net.minecraft.core.BlockPos>
    getPlaneOfBlocks(net.minecraft.core.BlockPos pos, int x, int z, Predicate<net.minecraft.core.BlockPos> predicate)
     
    static Collection<net.minecraft.core.BlockPos>
    getPlaneOfBlocks(net.minecraft.core.BlockPos pos, int range, Predicate<net.minecraft.core.BlockPos> predicate)
     
    static Stream<net.minecraft.core.BlockPos>
    getPlaneOfBlocksStream(net.minecraft.core.BlockPos pos, int x, int z)
     
    static Stream<net.minecraft.core.BlockPos>
    getPlaneOfBlocksStream(net.minecraft.core.BlockPos pos, int x1, int z1, int x2, int z2)
     
    static Stream<net.minecraft.core.BlockPos>
    getPlaneOfBlocksStream(net.minecraft.core.BlockPos pos, int x, int z, Predicate<net.minecraft.core.BlockPos> predicate)
     
    static Stream<net.minecraft.core.BlockPos>
    getPlaneOfBlocksStream(net.minecraft.core.BlockPos pos, int range, Predicate<net.minecraft.core.BlockPos> predicate)
     
    static Collection<net.minecraft.core.BlockPos>
    getSphereOfBlocks(net.minecraft.core.BlockPos pos, float range)
     
    static Collection<net.minecraft.core.BlockPos>
    getSphereOfBlocks(net.minecraft.core.BlockPos pos, float width, float height)
     
    static Collection<net.minecraft.core.BlockPos>
    getSphereOfBlocks(net.minecraft.core.BlockPos pos, float width, float height, Predicate<net.minecraft.core.BlockPos> predicate)
     
    static Collection<net.minecraft.core.BlockPos>
    getSphereOfBlocks(net.minecraft.core.BlockPos pos, float range, Predicate<net.minecraft.core.BlockPos> predicate)
     
    static Stream<net.minecraft.core.BlockPos>
    getSphereOfBlocksStream(net.minecraft.core.BlockPos pos, float range)
     
    static Stream<net.minecraft.core.BlockPos>
    getSphereOfBlocksStream(net.minecraft.core.BlockPos pos, float width, float height)
     
    static Stream<net.minecraft.core.BlockPos>
    getSphereOfBlocksStream(net.minecraft.core.BlockPos pos, float width, float height, Predicate<net.minecraft.core.BlockPos> predicate)
     
    static Stream<net.minecraft.core.BlockPos>
    getSphereOfBlocksStream(net.minecraft.core.BlockPos pos, float range, Predicate<net.minecraft.core.BlockPos> predicate)
     
    static net.minecraft.core.BlockPos
    loadBlockPos(net.minecraft.nbt.CompoundTag tag)
    Loads a block position from nbt.
    static net.minecraft.core.BlockPos
    loadBlockPos(net.minecraft.nbt.CompoundTag tag, String extra)
    Loads a block position from nbt with extra text as input.
    static <T extends Comparable<T>>
    net.minecraft.world.level.block.state.BlockState
    newStateWithOldProperty(net.minecraft.world.level.block.state.BlockState oldState, net.minecraft.world.level.block.state.BlockState newState, net.minecraft.world.level.block.state.properties.Property<T> property)
     
    static void
    saveBlockPos(net.minecraft.nbt.CompoundTag compoundNBT, net.minecraft.core.BlockPos pos)
    Saves a block position to nbt.
    static void
    saveBlockPos(net.minecraft.nbt.CompoundTag compoundNBT, net.minecraft.core.BlockPos pos, String extra)
    Saves a block position to nbt with extra text to differentiate it.
    static net.minecraft.world.level.block.state.BlockState
    setBlockStateWithExistingProperties(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState newState, int flags)
    Copies BlockState properties from a BlockState already in the world, and replaces it with a newState with matching property values.
    static void
    updateAndNotifyState(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
     
    static void
    updateAndNotifyState(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
     
    static void
    updateState(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
     
    static void
    updateState(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
     
    static net.minecraft.world.phys.Vec3
    withinBlock(Random rand, net.minecraft.core.BlockPos pos)
    Generates a randomly picked position within a block

    Methods inherited from class java.lang.Object

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

    • BlockHelper

      public BlockHelper()
  • Method Details

    • getBlockStateWithExistingProperties

      public static net.minecraft.world.level.block.state.BlockState getBlockStateWithExistingProperties(net.minecraft.world.level.block.state.BlockState oldState, net.minecraft.world.level.block.state.BlockState newState)
      Copies all properties from oldState to newState, given that an individual property exists on the newState.
      Parameters:
      oldState - - State to copy properties from.
      newState - - State to apply copied property values to.
      Returns:
      - NewState with adjusted properties.
    • setBlockStateWithExistingProperties

      public static net.minecraft.world.level.block.state.BlockState setBlockStateWithExistingProperties(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState newState, int flags)
      Copies BlockState properties from a BlockState already in the world, and replaces it with a newState with matching property values.
    • newStateWithOldProperty

      public static <T extends Comparable<T>> net.minecraft.world.level.block.state.BlockState newStateWithOldProperty(net.minecraft.world.level.block.state.BlockState oldState, net.minecraft.world.level.block.state.BlockState newState, net.minecraft.world.level.block.state.properties.Property<T> property)
    • saveBlockPos

      public static void saveBlockPos(net.minecraft.nbt.CompoundTag compoundNBT, net.minecraft.core.BlockPos pos)
      Saves a block position to nbt.
    • saveBlockPos

      public static void saveBlockPos(net.minecraft.nbt.CompoundTag compoundNBT, net.minecraft.core.BlockPos pos, String extra)
      Saves a block position to nbt with extra text to differentiate it.
    • loadBlockPos

      public static net.minecraft.core.BlockPos loadBlockPos(net.minecraft.nbt.CompoundTag tag)
      Loads a block position from nbt.
    • loadBlockPos

      public static net.minecraft.core.BlockPos loadBlockPos(net.minecraft.nbt.CompoundTag tag, String extra)
      Loads a block position from nbt with extra text as input.
    • getBlockEntities

      public static <T> Collection<T> getBlockEntities(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int range, Predicate<T> predicate)
      Returns a list of block entities within a range, with a predicate for conditional checks.
    • getBlockEntitiesStream

      public static <T> Stream<T> getBlockEntitiesStream(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int range, Predicate<T> predicate)
      Returns a list of block entities within a range, with a predicate for conditional checks, as stream
    • getBlockEntities

      public static <T> Collection<T> getBlockEntities(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x, int z, Predicate<T> predicate)
      Returns a list of block entities within an XZ range, with a predicate for conditional checks.
    • getBlockEntitiesStream

      public static <T> Stream<T> getBlockEntitiesStream(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x, int z, Predicate<T> predicate)
      Returns a list of block entities within an XZ range, with a predicate for conditional checks, as stream
    • getBlockEntities

      public static <T> Collection<T> getBlockEntities(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x, int y, int z, Predicate<T> predicate)
      Returns a list of block entities within an XYZ range, with a predicate for conditional checks.
    • getBlockEntitiesStream

      public static <T> Stream<T> getBlockEntitiesStream(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x, int y, int z, Predicate<T> predicate)
      Returns a list of block entities within an XYZ range, with a predicate for conditional checks, as streamq
    • getBlockEntities

      public static <T> Collection<T> getBlockEntities(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int range)
      Returns a list of block entities within a radius around a position.
    • getBlockEntitiesStream

      public static <T> Stream<T> getBlockEntitiesStream(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int range)
      Returns a list of block entities within a radius around a position, as stream
      Parameters:
      type - - Class of the block entity to search for
      level - - Level to search in
      pos - - Position to search around
      range - - Radius to search in
      Returns:
      - Stream of block entities
    • getBlockEntities

      public static <T> Collection<T> getBlockEntities(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x, int z)
      Returns a list of block entities within an XZ radius around a position.
    • getBlockEntitiesStream

      public static <T> Stream<T> getBlockEntitiesStream(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x, int z)
      Returns a list of block entities within an XZ radius around a position, as stream
      Parameters:
      type - - Class of the block entity to search for
      level - - Level to search in
      pos - - Position to search around
      x - - Radius to search in X
      z - - Radius to search in Z
      Returns:
      - Stream of block entities
    • getBlockEntities

      public static <T> Collection<T> getBlockEntities(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x, int y, int z)
      Returns a list of block entities within an XYZ radius around a position.
    • getBlockEntitiesStream

      public static <T> Stream<T> getBlockEntitiesStream(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x, int y, int z)
      Returns a list of block entities within an XYZ radius around a position, as stream
      Parameters:
      type - - Class of the block entity to search for
      level - - Level to search in
      pos - - Position to search around
      x - - Radius to search in X
      y - - Radius to search in Y
      z - - Radius to search in Z
      Returns:
      - Stream of block entities
    • getBlockEntities

      public static <T> Collection<T> getBlockEntities(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x1, int y1, int z1, int x2, int y2, int z2)
      Returns a list of block entities within set coordinates.
    • getBlockEntitiesStream

      public static <T> Stream<T> getBlockEntitiesStream(Class<T> type, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int x1, int y1, int z1, int x2, int y2, int z2)
      Returns a list of block entities within set coordinates, as stream
    • getBlockEntities

      public static <T> Collection<T> getBlockEntities(Class<T> type, net.minecraft.world.level.Level world, net.minecraft.world.phys.AABB bb)
      Returns a list of block entities within an AABB.
    • getBlockEntitiesStream

      public static <T> Stream<T> getBlockEntitiesStream(Class<T> type, net.minecraft.world.level.Level world, net.minecraft.world.phys.AABB bb)
      Returns a list of block entities within an AABB, as stream
    • getBlocks

      public static Collection<net.minecraft.core.BlockPos> getBlocks(net.minecraft.core.BlockPos pos, int range, Predicate<net.minecraft.core.BlockPos> predicate)
      Returns a list of block positions within a radius around a position, with a predicate for conditional checks.
    • getBlocksStream

      public static Stream<net.minecraft.core.BlockPos> getBlocksStream(net.minecraft.core.BlockPos pos, int range, Predicate<net.minecraft.core.BlockPos> predicate)
      Returns a list of block positions within a radius around a position, with a predicate for conditional checks, as stream
    • getBlocks

      public static Collection<net.minecraft.core.BlockPos> getBlocks(net.minecraft.core.BlockPos pos, int x, int y, int z, Predicate<net.minecraft.core.BlockPos> predicate)
      Returns a list of block positions within a XYZ radius around a position, with a predicate for conditional checks.
    • getBlocksStream

      public static Stream<net.minecraft.core.BlockPos> getBlocksStream(net.minecraft.core.BlockPos pos, int x, int y, int z, Predicate<net.minecraft.core.BlockPos> predicate)
      Returns a list of block positions within a XYZ radius around a position, with a predicate for conditional checks, as stream
    • getBlocks

      public static Collection<net.minecraft.core.BlockPos> getBlocks(net.minecraft.core.BlockPos pos, int x, int y, int z)
      Returns a list of block positions within a XYZ radius around a position.
    • getBlocksStream

      public static Stream<net.minecraft.core.BlockPos> getBlocksStream(net.minecraft.core.BlockPos pos, int x, int y, int z)
      Returns a list of block positions within a XYZ radius around a position, as stream
    • getBlocks

      public static Collection<net.minecraft.core.BlockPos> getBlocks(net.minecraft.core.BlockPos pos, int x1, int y1, int z1, int x2, int y2, int z2)
      Returns a list of block positions within set coordinates.
    • getBlocksStream

      public static Stream<net.minecraft.core.BlockPos> getBlocksStream(net.minecraft.core.BlockPos pos, int x1, int y1, int z1, int x2, int y2, int z2)
      Returns a list of block positions within set coordinates, as stream
    • getPlaneOfBlocks

      public static Collection<net.minecraft.core.BlockPos> getPlaneOfBlocks(net.minecraft.core.BlockPos pos, int range, Predicate<net.minecraft.core.BlockPos> predicate)
    • getPlaneOfBlocksStream

      public static Stream<net.minecraft.core.BlockPos> getPlaneOfBlocksStream(net.minecraft.core.BlockPos pos, int range, Predicate<net.minecraft.core.BlockPos> predicate)
    • getPlaneOfBlocks

      public static Collection<net.minecraft.core.BlockPos> getPlaneOfBlocks(net.minecraft.core.BlockPos pos, int x, int z, Predicate<net.minecraft.core.BlockPos> predicate)
    • getPlaneOfBlocksStream

      public static Stream<net.minecraft.core.BlockPos> getPlaneOfBlocksStream(net.minecraft.core.BlockPos pos, int x, int z, Predicate<net.minecraft.core.BlockPos> predicate)
    • getPlaneOfBlocks

      public static Collection<net.minecraft.core.BlockPos> getPlaneOfBlocks(net.minecraft.core.BlockPos pos, int x, int z)
    • getPlaneOfBlocksStream

      public static Stream<net.minecraft.core.BlockPos> getPlaneOfBlocksStream(net.minecraft.core.BlockPos pos, int x, int z)
    • getPlaneOfBlocks

      public static Collection<net.minecraft.core.BlockPos> getPlaneOfBlocks(net.minecraft.core.BlockPos pos, int x1, int z1, int x2, int z2)
    • getPlaneOfBlocksStream

      public static Stream<net.minecraft.core.BlockPos> getPlaneOfBlocksStream(net.minecraft.core.BlockPos pos, int x1, int z1, int x2, int z2)
    • getSphereOfBlocks

      public static Collection<net.minecraft.core.BlockPos> getSphereOfBlocks(net.minecraft.core.BlockPos pos, float range, Predicate<net.minecraft.core.BlockPos> predicate)
    • getSphereOfBlocksStream

      public static Stream<net.minecraft.core.BlockPos> getSphereOfBlocksStream(net.minecraft.core.BlockPos pos, float range, Predicate<net.minecraft.core.BlockPos> predicate)
    • getSphereOfBlocks

      public static Collection<net.minecraft.core.BlockPos> getSphereOfBlocks(net.minecraft.core.BlockPos pos, float width, float height, Predicate<net.minecraft.core.BlockPos> predicate)
    • getSphereOfBlocksStream

      public static Stream<net.minecraft.core.BlockPos> getSphereOfBlocksStream(net.minecraft.core.BlockPos pos, float width, float height, Predicate<net.minecraft.core.BlockPos> predicate)
    • getSphereOfBlocks

      public static Collection<net.minecraft.core.BlockPos> getSphereOfBlocks(net.minecraft.core.BlockPos pos, float range)
    • getSphereOfBlocksStream

      public static Stream<net.minecraft.core.BlockPos> getSphereOfBlocksStream(net.minecraft.core.BlockPos pos, float range)
    • getSphereOfBlocks

      public static Collection<net.minecraft.core.BlockPos> getSphereOfBlocks(net.minecraft.core.BlockPos pos, float width, float height)
    • getSphereOfBlocksStream

      public static Stream<net.minecraft.core.BlockPos> getSphereOfBlocksStream(net.minecraft.core.BlockPos pos, float width, float height)
    • getNeighboringBlocks

      public static Collection<net.minecraft.core.BlockPos> getNeighboringBlocks(net.minecraft.core.BlockPos current)
      Quick method to get all blocks neighboring a block.
    • getNeighboringBlocksStream

      public static Stream<net.minecraft.core.BlockPos> getNeighboringBlocksStream(net.minecraft.core.BlockPos current)
      Quick method to get all blocks neighboring a block, as stream.
    • getPath

      public static Collection<net.minecraft.core.BlockPos> getPath(net.minecraft.core.BlockPos start, net.minecraft.core.BlockPos end, int speed, boolean inclusive, net.minecraft.world.level.Level level)
    • updateState

      public static void updateState(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
    • updateState

      public static void updateState(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
    • updateAndNotifyState

      public static void updateAndNotifyState(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
    • updateAndNotifyState

      public static void updateAndNotifyState(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
    • fromBlockPos

      public static net.minecraft.world.phys.Vec3 fromBlockPos(net.minecraft.core.BlockPos pos)
      Converts a block position into a Vec3 entry.
      Parameters:
      pos - the block position
      Returns:
      the vec3 representation.
    • withinBlock

      public static net.minecraft.world.phys.Vec3 withinBlock(Random rand, net.minecraft.core.BlockPos pos)
      Generates a randomly picked position within a block
      Parameters:
      rand - an instance of random
      pos - the position the block is centered around
      Returns:
      The randomized vector position