Package net.nullved.pmweatherapi.storm
Class NearbyStorms
java.lang.Object
net.nullved.pmweatherapi.storm.NearbyStorms
Get all the storms within a given radius around a
BlockPos or ChunkPos- Since:
- 0.14.15.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic NearbyStormsclient()Get theNearbyStormsinstance for the clientvoidforStormNearBlock(net.minecraft.core.BlockPos block, double radius, Consumer<dev.protomanly.pmweather.weather.Storm> consumer) Executes the givenConsumerfor eachStormin a defined radius around the blockvoidforStormNearBlock(net.minecraft.core.BlockPos block, double radius, StormType type, Consumer<dev.protomanly.pmweather.weather.Storm> consumer) voidforStormNearChunk(net.minecraft.world.level.ChunkPos chunk, double radius, Consumer<dev.protomanly.pmweather.weather.Storm> consumer) Executes the givenConsumerfor eachStormin a defined radius around the center of the chunkvoidforStormNearChunk(net.minecraft.world.level.ChunkPos chunk, double radius, StormType type, Consumer<dev.protomanly.pmweather.weather.Storm> consumer) voidforStormNearPlayer(net.minecraft.world.entity.player.Player player, double radius, Consumer<dev.protomanly.pmweather.weather.Storm> consumer) voidforStormNearPlayer(net.minecraft.world.entity.player.Player player, double radius, StormType type, Consumer<dev.protomanly.pmweather.weather.Storm> consumer) static NearbyStormsget(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dim) GetNearbyStormsfor the given dimensionstatic NearbyStormsget(net.minecraft.world.level.Level level) GetNearbyStormsfor the given levelList<dev.protomanly.pmweather.weather.Storm> stormsNearBlock(net.minecraft.core.BlockPos block, double radius) Returns aListofStorms in a defined radius around the blockList<dev.protomanly.pmweather.weather.Storm> stormsNearBlock(net.minecraft.core.BlockPos block, double radius, StormType type) List<dev.protomanly.pmweather.weather.Storm> stormsNearChunk(net.minecraft.world.level.ChunkPos chunk, double radius) Returns aListofStorms in a defined radius around the center of the chunkList<dev.protomanly.pmweather.weather.Storm> stormsNearChunk(net.minecraft.world.level.ChunkPos chunk, double radius, StormType type) List<dev.protomanly.pmweather.weather.Storm> stormsNearPlayer(net.minecraft.world.entity.player.Player player, double radius) List<dev.protomanly.pmweather.weather.Storm> stormsNearPlayer(net.minecraft.world.entity.player.Player player, double radius, StormType type)
-
Method Details
-
client
Get theNearbyStormsinstance for the client- Returns:
- The client-specific
NearbyStormsinstance - Since:
- 0.14.15.3
-
get
public static NearbyStorms get(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dim) GetNearbyStormsfor the given dimension- Parameters:
dim- TheResourceKeyof the dimension- Returns:
- A
NearbyStormsinstance
-
get
GetNearbyStormsfor the given level- Parameters:
level- TheLevelwith the storms- Returns:
- A
NearbyStormsinstance
-
stormsNearBlock
public List<dev.protomanly.pmweather.weather.Storm> stormsNearBlock(net.minecraft.core.BlockPos block, double radius) Returns aListofStorms in a defined radius around the block- Parameters:
block- TheBlockPosof the block at the center of the search arearadius- The radius of the search area- Returns:
- A
ListofStorms - Since:
- 0.14.15.0
-
stormsNearChunk
public List<dev.protomanly.pmweather.weather.Storm> stormsNearChunk(net.minecraft.world.level.ChunkPos chunk, double radius) Returns aListofStorms in 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 area- Returns:
- A
ListofStorms - Since:
- 0.14.15.0
-
stormsNearPlayer
public List<dev.protomanly.pmweather.weather.Storm> stormsNearPlayer(net.minecraft.world.entity.player.Player player, double radius) - Parameters:
player- ThePlayerto search aroundradius- The radius of the search area- Returns:
- A
ListofStorms - Since:
- 0.14.15.4
-
forStormNearBlock
public void forStormNearBlock(net.minecraft.core.BlockPos block, double radius, Consumer<dev.protomanly.pmweather.weather.Storm> consumer) Executes the givenConsumerfor eachStormin a defined radius around the block- Parameters:
block- TheBlockPosof the block at the center of the search arearadius- The radius of the search areaconsumer- TheConsumerto execute for eachStorm- Since:
- 0.14.15.0
-
forStormNearChunk
public void forStormNearChunk(net.minecraft.world.level.ChunkPos chunk, double radius, Consumer<dev.protomanly.pmweather.weather.Storm> consumer) Executes the givenConsumerfor eachStormin 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 eachStorm- Since:
- 0.14.15.0
-
forStormNearPlayer
public void forStormNearPlayer(net.minecraft.world.entity.player.Player player, double radius, Consumer<dev.protomanly.pmweather.weather.Storm> consumer) - Parameters:
player- ThePlayerto search aroundradius- The radius of the search areaconsumer- TheConsumerto execute for eachStorm- Since:
- 0.14.15.4
-
stormsNearBlock
-
stormsNearChunk
-
stormsNearPlayer
-
forStormNearBlock
public void forStormNearBlock(net.minecraft.core.BlockPos block, double radius, StormType type, Consumer<dev.protomanly.pmweather.weather.Storm> consumer) -
forStormNearChunk
public void forStormNearChunk(net.minecraft.world.level.ChunkPos chunk, double radius, StormType type, Consumer<dev.protomanly.pmweather.weather.Storm> consumer) -
forStormNearPlayer
public void forStormNearPlayer(net.minecraft.world.entity.player.Player player, double radius, StormType type, Consumer<dev.protomanly.pmweather.weather.Storm> consumer)
-