Builder for the 'WeatherCheck' loot condition.

This condition checks the current in-game weather, ensuring that it matches the parameters specified in the condition itself.

A well-formed 'WeatherCheck' loot condition must have at least one of the various possible states set. If that isn't the case, then the condition will simply pass no matter what, making its presence redundant.

Импорт класса

Link to импорт-класса

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.loot.conditions.vanilla.WeatherCheck;

Implemented Interfaces

Link to implemented-interfaces

WeatherCheck implements the following interfaces. That means all methods defined in these interfaces are also available in WeatherCheck

Name: withRain

Sets the condition to require a rainy weather.

If the condition had been previously set to require a non-rainy weather, then the value gets overwritten.

This parameter is optional.

Returns: This builder for chaining.
Return Type: WeatherCheck

ZenScript
Copy
// WeatherCheck.withRain() as WeatherCheck

myWeatherCheck.withRain();

Name: withThunders

Sets the condition to require a thundering weather.

If the condition had been previously set to require a non-thundering weather, then the value gets overwritten.

This parameter is optional.

Returns: This builder for chaining.
Return Type: WeatherCheck

ZenScript
Copy
// WeatherCheck.withThunders() as WeatherCheck

myWeatherCheck.withThunders();

Name: withoutRain

Sets the condition to require a non-rainy weather.

If the condition had been previously set to require a rainy weather, then the value gets overwritten.

This parameter is optional.

Returns: This builder for chaining.
Return Type: WeatherCheck

ZenScript
Copy
// WeatherCheck.withoutRain() as WeatherCheck

myWeatherCheck.withoutRain();

Name: withoutThunders

Sets the condition to require a non-thundering weather.

If the condition had been previously set to require a thundering weather, then the value gets overwritten.

This parameter is optional.

Returns: This builder for chaining.
Return Type: WeatherCheck

ZenScript
Copy
// WeatherCheck.withoutThunders() as WeatherCheck

myWeatherCheck.withoutThunders();