Package net.nullved.pmweatherapi.storm
Class Storms
java.lang.Object
net.nullved.pmweatherapi.storm.Storms
Get all the storms within a given radius around a
BlockPos or ChunkPos-
Method Summary
Modifier and TypeMethodDescriptionvoidforStormNearBlock(net.minecraft.core.BlockPos block, double radius, Consumer<dev.protomanly.pmweather.weather.Storm> consumer) Executes the givenConsumerfor eachStormin a defined radius around the blockvoidforStormNearChunk(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 chunkstatic Stormsget(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dim) GetStormsfor the given dimensionstatic Stormsget(net.minecraft.world.level.Level level) GetStormsfor 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> stormsNearChunk(net.minecraft.world.level.ChunkPos chunk, double radius) Returns aListofStorms in a defined radius around the center of the chunk
-
Method Details
-
get
GetStormsfor the given dimension- Parameters:
dim- TheResourceKeyof the dimension- Returns:
- A
Stormsinstance
-
get
GetStormsfor the given level- Parameters:
level- TheLevelwith the storms- Returns:
- A
Stormsinstance
-
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
-
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
-