Class BlockEntityHelper

java.lang.Object
team.lodestar.lodestone.helpers.block.BlockEntityHelper

public class BlockEntityHelper extends Object
A collection of various helper methods related to block entities
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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

    Methods inherited from class java.lang.Object

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

    • BlockEntityHelper

      public BlockEntityHelper()
  • Method Details

    • 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