Class BlockEntityHelper
java.lang.Object
team.lodestar.lodestone.helpers.block.BlockEntityHelper
A collection of various helper methods related to block entities
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <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 streamstatic <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 streamstatic <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 streamstatic <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 streamstatic <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 streamqstatic <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 streamstatic <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 streamstatic <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
-
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 forlevel- - Level to search inpos- - Position to search aroundrange- - 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 forlevel- - Level to search inpos- - Position to search aroundx- - Radius to search in Xz- - 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 forlevel- - Level to search inpos- - Position to search aroundx- - Radius to search in Xy- - Radius to search in Yz- - 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
-