# WeatherCheck

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.

## Diese Klasse importieren

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.

``import crafttweaker.api.loot.conditions.vanilla.WeatherCheck;``

## Implemented Interfaces

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

## Methoden

### 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.

Return Type: WeatherCheck

``````WeatherCheck.withRain() as WeatherCheck
myWeatherCheck.withRain();``````

### 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.

Return Type: WeatherCheck

``````WeatherCheck.withThunders() as WeatherCheck
myWeatherCheck.withThunders();``````

### 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.

Return Type: WeatherCheck

``````WeatherCheck.withoutRain() as WeatherCheck
myWeatherCheck.withoutRain();``````

### 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.

Return Type: WeatherCheck

``````WeatherCheck.withoutThunders() as WeatherCheck
myWeatherCheck.withoutThunders();``````