public static class FoodComponent.Builder extends Object
Modifier and Type | Field and Description |
---|---|
private boolean |
alwaysEdible |
private int |
hunger |
private boolean |
meat |
private float |
saturationModifier |
private boolean |
snack |
private List<Pair<StatusEffectInstance,Float>> |
statusEffects |
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
FoodComponent.Builder |
alwaysEdible() |
FoodComponent |
build() |
FoodComponent.Builder |
hunger(int hunger) |
FoodComponent.Builder |
meat() |
FoodComponent.Builder |
saturationModifier(float saturationModifier) |
FoodComponent.Builder |
snack() |
FoodComponent.Builder |
statusEffect(StatusEffectInstance effect,
float chance) |
private int hunger
private float saturationModifier
private boolean meat
private boolean alwaysEdible
private boolean snack
private final List<Pair<StatusEffectInstance,Float>> statusEffects
public FoodComponent.Builder hunger(int hunger)
public FoodComponent.Builder saturationModifier(float saturationModifier)
public FoodComponent.Builder meat()
public FoodComponent.Builder alwaysEdible()
public FoodComponent.Builder snack()
public FoodComponent.Builder statusEffect(StatusEffectInstance effect, float chance)
public FoodComponent build()