Package net.nullved.pmweatherapi.radar
Class NearbyRadars
java.lang.Object
net.nullved.pmweatherapi.radar.NearbyRadars
Get all the radars within a given radius around a
BlockPos or ChunkPos-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidforRadarNearBlock(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level, net.minecraft.core.BlockPos block, double radius, Consumer<net.minecraft.core.BlockPos> consumer) static voidforRadarNearBlock(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos block, double radius, Consumer<net.minecraft.core.BlockPos> consumer) static voidforRadarNearChunk(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level, net.minecraft.world.level.ChunkPos chunk, double radius, Consumer<net.minecraft.core.BlockPos> consumer) Executes the givenConsumerfor eachBlockPosof aRadarBlockin a defined radius around the center of the chunkstatic voidforRadarNearChunk(net.minecraft.world.level.Level level, net.minecraft.world.level.ChunkPos chunk, double radius, Consumer<net.minecraft.core.BlockPos> consumer) Executes the givenConsumerfor eachBlockPosof aRadarBlockin a defined radius around the center of the chunkstatic Set<net.minecraft.core.BlockPos> radarsNearBlock(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level, net.minecraft.core.BlockPos pos, double radius) static Set<net.minecraft.core.BlockPos> radarsNearBlock(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, double radius) static Set<net.minecraft.core.BlockPos> radarsNearChunk(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level, net.minecraft.world.level.ChunkPos pos, double radius) static Set<net.minecraft.core.BlockPos> radarsNearChunk(net.minecraft.world.level.Level level, net.minecraft.world.level.ChunkPos pos, double radius)
-
Constructor Details
-
NearbyRadars
public NearbyRadars()
-
-
Method Details
-
radarsNearBlock
public static Set<net.minecraft.core.BlockPos> radarsNearBlock(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, double radius) - Parameters:
level- TheLevelto searchpos- TheBlockPosof the block at the center of the search arearadius- The radius of the search area- Returns:
- A
SetofBlockPos - Since:
- 0.14.15.0
-
radarsNearBlock
public static Set<net.minecraft.core.BlockPos> radarsNearBlock(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level, net.minecraft.core.BlockPos pos, double radius) - Parameters:
level- TheResourceKeyfor theLevelto searchpos- TheBlockPosof the block at the center of the search arearadius- The radius of the search area- Returns:
- A
SetofBlockPos - Since:
- 0.14.15.1
-
radarsNearChunk
public static Set<net.minecraft.core.BlockPos> radarsNearChunk(net.minecraft.world.level.Level level, net.minecraft.world.level.ChunkPos pos, double radius) - Parameters:
level- TheLevelto searchpos- TheChunkPosof the chunkradius- The radius of the search area- Returns:
- A
SetofBlockPos - Since:
- 0.14.15.0
-
radarsNearChunk
public static Set<net.minecraft.core.BlockPos> radarsNearChunk(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level, net.minecraft.world.level.ChunkPos pos, double radius) - Parameters:
level- TheResourceKeyfor theLevelto searchpos- TheChunkPosof the chunkradius- The radius of the search area- Returns:
- A
SetofBlockPos - Since:
- 0.14.15.1
-
forRadarNearBlock
public static void forRadarNearBlock(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos block, double radius, Consumer<net.minecraft.core.BlockPos> consumer) - Parameters:
level- TheLevelto searchblock- TheBlockPosof the block at the center of the search arearadius- The radius of the search areaconsumer- TheConsumerto execute for eachBlockPos- Since:
- 0.14.15.0
-
forRadarNearBlock
public static void forRadarNearBlock(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level, net.minecraft.core.BlockPos block, double radius, Consumer<net.minecraft.core.BlockPos> consumer) - Parameters:
level- TheResourceKeyof aLevelto searchblock- TheBlockPosof the block at the center of the search arearadius- The radius of the search areaconsumer- TheConsumerto execute for eachBlockPos- Since:
- 0.14.15.1
-
forRadarNearChunk
public static void forRadarNearChunk(net.minecraft.world.level.Level level, net.minecraft.world.level.ChunkPos chunk, double radius, Consumer<net.minecraft.core.BlockPos> consumer) Executes the givenConsumerfor eachBlockPosof aRadarBlockin a defined radius around the center of the chunk- Parameters:
level- TheLevelto searchchunk- TheChunkPosof the chunk at the center of the search area.radius- The radius of the search areaconsumer- TheConsumerto execute for eachBlockPos- Since:
- 0.14.15.0
-
forRadarNearChunk
public static void forRadarNearChunk(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level, net.minecraft.world.level.ChunkPos chunk, double radius, Consumer<net.minecraft.core.BlockPos> consumer) Executes the givenConsumerfor eachBlockPosof aRadarBlockin a defined radius around the center of the chunk- Parameters:
level- TheResourceKeyof aLevelto searchchunk- TheChunkPosof the chunk at the center of the search area.radius- The radius of the search areaconsumer- TheConsumerto execute for eachBlockPos- Since:
- 0.14.15.0
-