Class NearbyStorms

java.lang.Object
net.nullved.pmweatherapi.storm.NearbyStorms

public class NearbyStorms extends Object
Get all the storms within a given radius around a BlockPos or ChunkPos
Since:
0.14.15.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the NearbyStorms instance for the client
    void
    forStormNearBlock(net.minecraft.core.BlockPos block, double radius, Consumer<dev.protomanly.pmweather.weather.Storm> consumer)
    Executes the given Consumer for each Storm in a defined radius around the block
    void
    forStormNearBlock(net.minecraft.core.BlockPos block, double radius, StormType type, Consumer<dev.protomanly.pmweather.weather.Storm> consumer)
    Executes the given Consumer for each Storm that meets the StormType in a defined radius around the block
    void
    forStormNearChunk(net.minecraft.world.level.ChunkPos chunk, double radius, Consumer<dev.protomanly.pmweather.weather.Storm> consumer)
    Executes the given Consumer for each Storm in a defined radius around the center of the chunk
    void
    forStormNearChunk(net.minecraft.world.level.ChunkPos chunk, double radius, StormType type, Consumer<dev.protomanly.pmweather.weather.Storm> consumer)
    Executes the given Consumer for each Storm that meets the StormType in a defined radius around the center of the chunk
    void
    forStormNearPlayer(net.minecraft.world.entity.player.Player player, double radius, Consumer<dev.protomanly.pmweather.weather.Storm> consumer)
    Executes the given Consumer for each Storm in a defined radius around the given Player
    void
    forStormNearPlayer(net.minecraft.world.entity.player.Player player, double radius, StormType type, Consumer<dev.protomanly.pmweather.weather.Storm> consumer)
    Executes the given Consumer for each Storm that meets the StormType in a defined radius around the given Player
    get(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dim)
    Get NearbyStorms for the given dimension
    get(net.minecraft.world.level.Level level)
    Get NearbyStorms for the given level
    List<dev.protomanly.pmweather.weather.Storm>
    stormsNearBlock(net.minecraft.core.BlockPos block, double radius)
    Returns a List of Storms in a defined radius around the block
    List<dev.protomanly.pmweather.weather.Storm>
    stormsNearBlock(net.minecraft.core.BlockPos block, double radius, StormType type)
    Returns a List of Storms that meet the StormType in a defined radius around the block
    List<dev.protomanly.pmweather.weather.Storm>
    stormsNearChunk(net.minecraft.world.level.ChunkPos chunk, double radius)
    Returns a List of Storms in a defined radius around the center of the chunk
    List<dev.protomanly.pmweather.weather.Storm>
    stormsNearChunk(net.minecraft.world.level.ChunkPos chunk, double radius, StormType type)
    Returns a List of Storms that meet the StormType in a defined radius around the center of the chunk
    List<dev.protomanly.pmweather.weather.Storm>
    stormsNearPlayer(net.minecraft.world.entity.player.Player player, double radius)
    Returns a List of Storms in a defined radius around the given Player
    List<dev.protomanly.pmweather.weather.Storm>
    stormsNearPlayer(net.minecraft.world.entity.player.Player player, double radius, StormType type)
    Returns a List of Storms that meet the StormType in a defined radius around the given Player

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • client

      public static NearbyStorms client()
      Get the NearbyStorms instance for the client
      Returns:
      The client-specific NearbyStorms instance
      Since:
      0.14.15.3
    • get

      public static NearbyStorms get(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dim)
      Get NearbyStorms for the given dimension
      Parameters:
      dim - The ResourceKey of the dimension
      Returns:
      A NearbyStorms instance
    • get

      public static NearbyStorms get(net.minecraft.world.level.Level level)
      Get NearbyStorms for the given level
      Parameters:
      level - The Level with the storms
      Returns:
      A NearbyStorms instance
    • stormsNearBlock

      public List<dev.protomanly.pmweather.weather.Storm> stormsNearBlock(net.minecraft.core.BlockPos block, double radius)
      Returns a List of Storms in a defined radius around the block
      Parameters:
      block - The BlockPos of the block at the center of the search area
      radius - The radius of the search area
      Returns:
      A List of Storms
      Since:
      0.14.15.0
    • stormsNearChunk

      public List<dev.protomanly.pmweather.weather.Storm> stormsNearChunk(net.minecraft.world.level.ChunkPos chunk, double radius)
      Returns a List of Storms in a defined radius around the center of the chunk
      Parameters:
      chunk - The ChunkPos of the chunk at the center of the search area.
      radius - The radius of the search area
      Returns:
      A List of Storms
      Since:
      0.14.15.0
    • stormsNearPlayer

      public List<dev.protomanly.pmweather.weather.Storm> stormsNearPlayer(net.minecraft.world.entity.player.Player player, double radius)
      Returns a List of Storms in a defined radius around the given Player
      Parameters:
      player - The Player to search around
      radius - The radius of the search area
      Returns:
      A List of Storms
      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 given Consumer for each Storm in a defined radius around the block
      Parameters:
      block - The BlockPos of the block at the center of the search area
      radius - The radius of the search area
      consumer - The Consumer to execute for each Storm
      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 given Consumer for each Storm in a defined radius around the center of the chunk
      Parameters:
      chunk - The ChunkPos of the chunk at the center of the search area.
      radius - The radius of the search area
      consumer - The Consumer to execute for each Storm
      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)
      Executes the given Consumer for each Storm in a defined radius around the given Player
      Parameters:
      player - The Player to search around
      radius - The radius of the search area
      consumer - The Consumer to execute for each Storm
      Since:
      0.14.15.4
    • stormsNearBlock

      public List<dev.protomanly.pmweather.weather.Storm> stormsNearBlock(net.minecraft.core.BlockPos block, double radius, StormType type)
      Returns a List of Storms that meet the StormType in a defined radius around the block
      Parameters:
      block - The BlockPos of the block at the center of the search area
      radius - The radius of the search area
      type - The StormType to match
      Returns:
      A List of Storms
      Since:
      0.15.0.0
    • stormsNearChunk

      public List<dev.protomanly.pmweather.weather.Storm> stormsNearChunk(net.minecraft.world.level.ChunkPos chunk, double radius, StormType type)
      Returns a List of Storms that meet the StormType in a defined radius around the center of the chunk
      Parameters:
      chunk - The ChunkPos of the chunk at the center of the search area.
      radius - The radius of the search area
      type - The StormType to match
      Returns:
      A List of Storms
      Since:
      0.15.0.0
    • stormsNearPlayer

      public List<dev.protomanly.pmweather.weather.Storm> stormsNearPlayer(net.minecraft.world.entity.player.Player player, double radius, StormType type)
      Returns a List of Storms that meet the StormType in a defined radius around the given Player
      Parameters:
      player - The Player to search around
      radius - The radius of the search area
      type - The StormType to match
      Returns:
      A List of Storms
      Since:
      0.15.0.0
    • forStormNearBlock

      public void forStormNearBlock(net.minecraft.core.BlockPos block, double radius, StormType type, Consumer<dev.protomanly.pmweather.weather.Storm> consumer)
      Executes the given Consumer for each Storm that meets the StormType in a defined radius around the block
      Parameters:
      block - The BlockPos of the block at the center of the search area
      radius - The radius of the search area
      type - The StormType to match
      consumer - The Consumer to execute for each Storm
      Since:
      0.15.0.0
    • forStormNearChunk

      public void forStormNearChunk(net.minecraft.world.level.ChunkPos chunk, double radius, StormType type, Consumer<dev.protomanly.pmweather.weather.Storm> consumer)
      Executes the given Consumer for each Storm that meets the StormType in a defined radius around the center of the chunk
      Parameters:
      chunk - The ChunkPos of the chunk at the center of the search area.
      radius - The radius of the search area
      type - The StormType to match
      consumer - The Consumer to execute for each Storm
      Since:
      0.15.0.0
    • forStormNearPlayer

      public void forStormNearPlayer(net.minecraft.world.entity.player.Player player, double radius, StormType type, Consumer<dev.protomanly.pmweather.weather.Storm> consumer)
      Executes the given Consumer for each Storm that meets the StormType in a defined radius around the given Player
      Parameters:
      player - The Player to search around
      radius - The radius of the search area
      type - The StormType to match
      consumer - The Consumer to execute for each Storm
      Since:
      0.15.0.0