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- Since:
- 0.14.15.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic NearbyRadarsclient()Get theNearbyRadarsinstance for the clientvoidforRadarNearBlock(net.minecraft.core.BlockPos block, double radius, Consumer<net.minecraft.core.BlockPos> consumer) voidforRadarNearChunk(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 chunkvoidforRadarNearPlayer(net.minecraft.world.entity.player.Player player, double radius, Consumer<net.minecraft.core.BlockPos> consumer) static NearbyRadarsget(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dim) GetNearbyRadarsfor the given dimensionstatic NearbyRadarsget(net.minecraft.world.level.Level level) GetNearbyRadarsfor the given levelSet<net.minecraft.core.BlockPos> radarsNearBlock(net.minecraft.core.BlockPos pos, double radius) Set<net.minecraft.core.BlockPos> radarsNearChunk(net.minecraft.world.level.ChunkPos pos, double radius) Set<net.minecraft.core.BlockPos> radarsNearPlayer(net.minecraft.world.entity.player.Player player, double radius)
-
Method Details
-
client
Get theNearbyRadarsinstance for the client- Returns:
- The client-specific
NearbyRadarsinstance - Since:
- 0.14.15.3
-
get
public static NearbyRadars get(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dim) GetNearbyRadarsfor the given dimension- Parameters:
dim- TheResourceKeyof the dimension- Returns:
- A
NearbyRadarsinstance - Since:
- 0.14.15.3
-
get
GetNearbyRadarsfor the given level- Parameters:
level- TheLevelwith the storms- Returns:
- A
NearbyRadarsinstance - Since:
- 0.14.15.3
-
radarsNearBlock
public Set<net.minecraft.core.BlockPos> radarsNearBlock(net.minecraft.core.BlockPos pos, double radius) - Parameters:
pos- TheBlockPosof the block at the center of the search arearadius- The radius of the search area- Returns:
- A
SetofBlockPosaround, but not including, the givenBlockPos - Since:
- 0.14.15.1
-
radarsNearChunk
public Set<net.minecraft.core.BlockPos> radarsNearChunk(net.minecraft.world.level.ChunkPos pos, double radius) - Parameters:
pos- TheChunkPosof the chunkradius- The radius of the search area- Returns:
- A
SetofBlockPos - Since:
- 0.14.15.1
-
radarsNearPlayer
public Set<net.minecraft.core.BlockPos> radarsNearPlayer(net.minecraft.world.entity.player.Player player, double radius) - Parameters:
player- ThePlayerto search aroundradius- The radius of the search area- Returns:
- A
SetofBlockPosaround, but not including, the givenBlockPos - Since:
- 0.14.15.4
-
forRadarNearBlock
public void forRadarNearBlock(net.minecraft.core.BlockPos block, double radius, Consumer<net.minecraft.core.BlockPos> consumer) - Parameters:
block- 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 void forRadarNearChunk(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:
chunk- 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
-
forRadarNearPlayer
public void forRadarNearPlayer(net.minecraft.world.entity.player.Player player, double radius, Consumer<net.minecraft.core.BlockPos> consumer) - Parameters:
player- ThePlayerto search aroundradius- The radius of the search areaconsumer- TheConsumerto execute for eachBlockPos- Since:
- 0.14.15.4
-