Package net.nullved.pmweatherapi.storm
Class StormBuilder
java.lang.Object
net.nullved.pmweatherapi.storm.StormBuilder
A builder for
To spawn the storm in the world, use
Storms that makes it easy to create and spawn them.
Create a StormBuilder with any constructor or atPlayer(StormType, Player)
To spawn the storm in the world, use
buildAndSpawn(). To only create the storm instance, use build()- Since:
- 0.14.15.5
-
Constructor Summary
ConstructorsConstructorDescriptionStormBuilder(dev.protomanly.pmweather.weather.WeatherHandler weatherHandler, StormType type, net.minecraft.world.phys.Vec3 position) Create a newStormBuilderStormBuilder(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, StormType type, net.minecraft.world.phys.Vec3 position) Create a newStormBuilderStormBuilder(net.minecraft.world.level.Level level, StormType type, net.minecraft.world.phys.Vec3 position) Create a newStormBuilder -
Method Summary
Modifier and TypeMethodDescriptionAims theStormat a random player.aimAtPlayer(net.minecraft.world.entity.player.Player player) Aims theStormat the given player.static StormBuilderCreates aStormBuilderat aPlayer's dimension and positiondev.protomanly.pmweather.weather.Stormbuild()Builds the final storm, but does NOT spawn it.dev.protomanly.pmweather.weather.StormBuilds the final storm and spawns it.coldEnergy(int coldEnergy) Sets the cold energy of theStormcycloneWindspeed(float cycloneWindspeed) Sets the cyclone windspeed of theStormenergy(int energy) Sets the energy of theStormmaxColdEnergy(int maxColdEnergy) Sets the max cold energy of theStormmaxStage(int maxStage) Sets the max stage of theStormmaxWidth(int maxWidth) Sets the max width of theStormmaxWindspeed(int maxWindspeed) Sets the max windspeed of theStormrankineFactor(float rankineFactor) Sets the rankine factor of theStormrisk(float risk) Sets the risk of theStormsmoothWidth(float smoothWidth) Sets the smooth width of theStormsmoothWindspeed(float smoothWindspeed) Sets the smooth windspeed of theStormstage(int stage) Sets the stage of theStormvelocity(net.minecraft.world.phys.Vec3 velocity) Sets the velocity of theStorm.visualOnly(boolean visualOnly) Set theStormto be visual onlywidth(float width) Sets the width of theStormwindspeed(int windspeed) Sets the windspeed of theStorm
-
Constructor Details
-
StormBuilder
public StormBuilder(dev.protomanly.pmweather.weather.WeatherHandler weatherHandler, StormType type, net.minecraft.world.phys.Vec3 position) Create a newStormBuilder- Parameters:
weatherHandler- TheWeatherHandlerto usetype- TheStormTypeof stormposition- TheVec3representing the position of theStorm- Since:
- 0.14.15.5
-
StormBuilder
public StormBuilder(net.minecraft.world.level.Level level, StormType type, net.minecraft.world.phys.Vec3 position) Create a newStormBuilder- Parameters:
level- TheLevelto spawn intype- TheStormTypeof stormposition- TheVec3representing the position of theStorm- Since:
- 0.14.15.5
-
StormBuilder
public StormBuilder(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, StormType type, net.minecraft.world.phys.Vec3 position) Create a newStormBuilder- Parameters:
dimension- TheResourceKeyof the dimension to spawn intype- TheStormTypeof stormposition- TheVec3representing the position of theStorm- Since:
- 0.14.15.5
-
-
Method Details
-
atPlayer
public static StormBuilder atPlayer(StormType type, net.minecraft.world.entity.player.Player player) Creates aStormBuilderat aPlayer's dimension and position- Parameters:
type- TheStormTypeof stormplayer- ThePlayerto grab the dimension and position from- Returns:
- A new
StormBuilder - Since:
- 0.14.15.5
-
aimAtPlayer
- Parameters:
player- ThePlayerto aim theStormat- Returns:
- The
StormBuilderinstance - Since:
- 0.14.15.5
-
aimAtAnyPlayer
- Returns:
- The
StormBuilderinstance - Since:
- 0.14.15.5
-
visualOnly
Set theStormto be visual only- Parameters:
visualOnly- Whether the storm should be visual only- Returns:
- The
StormBuilderinstance - Since:
- 0.14.15.5
-
risk
Sets the risk of theStorm- Parameters:
risk- The risk- Returns:
- The
StormBuilderinstance - Since:
- 0.14.15.5
-
rankineFactor
Sets the rankine factor of theStorm- Parameters:
rankineFactor- The rankine factor- Returns:
- The
StormBuilderinstance - Since:
- 0.14.15.5
-
width
Sets the width of theStorm- Parameters:
width- The width- Returns:
- The
StormBuilderinstance - Since:
- 0.14.15.5
-
smoothWidth
Sets the smooth width of theStorm- Parameters:
smoothWidth- The smooth width- Returns:
- The
StormBuilderinstance - Since:
- 0.15.0.0
-
maxWidth
Sets the max width of theStorm- Parameters:
maxWidth- The max width- Returns:
- The
StormBuilderinstance - Since:
- 0.14.15.5
-
stage
Sets the stage of theStorm- Parameters:
stage- The stage- Returns:
- The
StormBuilderinstance - Since:
- 0.14.15.5
-
maxStage
Sets the max stage of theStorm- Parameters:
maxStage- The max stage- Returns:
- The
StormBuilderinstance - Since:
- 0.14.15.5
-
energy
Sets the energy of theStorm- Parameters:
energy- The energy- Returns:
- The
StormBuilderinstance - Since:
- 0.14.15.5
-
coldEnergy
Sets the cold energy of theStorm- Parameters:
coldEnergy- The cold energy- Returns:
- The
StormBuilderinstance - Since:
- 0.14.15.5
-
maxColdEnergy
Sets the max cold energy of theStorm- Parameters:
maxColdEnergy- The max cold energy- Returns:
- The
StormBuilderinstance - Since:
- 0.14.15.5
-
windspeed
Sets the windspeed of theStorm- Parameters:
windspeed- The windspeed- Returns:
- The
StormBuilderinstance - Since:
- 0.14.15.5
-
cycloneWindspeed
Sets the cyclone windspeed of theStorm- Parameters:
cycloneWindspeed- The cyclone windspeed- Returns:
- The
StormBuilderinstance - Since:
- 0.15.0.0
-
smoothWindspeed
Sets the smooth windspeed of theStorm- Parameters:
smoothWindspeed- The smooth windspeed- Returns:
- The
StormBuilderinstance - Since:
- 0.15.0.0
-
maxWindspeed
Sets the max windspeed of theStorm- Parameters:
maxWindspeed- The max windspeed- Returns:
- The
StormBuilderinstance - Since:
- 0.14.15.5
-
velocity
- Parameters:
velocity- The velocity of the storm- Returns:
- The
StormBuilderinstance - Since:
- 0.14.15.5
-
build
public dev.protomanly.pmweather.weather.Storm build()Builds the final storm, but does NOT spawn it. To spawn in, usebuildAndSpawn()instead- Returns:
- The built
Storminstance - Since:
- 0.14.15.5
-
buildAndSpawn
public dev.protomanly.pmweather.weather.Storm buildAndSpawn()Builds the final storm and spawns it. To NOT spawn it, usebuild()instead- Returns:
- The built
Storminstance - Since:
- 0.14.15.5
-