Package net.minecraft.item
Class Food.Builder
- java.lang.Object
-
- net.minecraft.item.Food.Builder
-
- Enclosing class:
- Food
public static class Food.Builder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
canAlwaysEat
private java.util.List<com.mojang.datafixers.util.Pair<java.util.function.Supplier<EffectInstance>,java.lang.Float>>
effects
private boolean
fastFood
private boolean
isMeat
private int
nutrition
private float
saturationModifier
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Food.Builder
alwaysEat()
Food
build()
Food.Builder
effect(java.util.function.Supplier<EffectInstance> effectIn, float probability)
Food.Builder
effect(EffectInstance p_221452_1_, float p_221452_2_)
Deprecated.Food.Builder
fast()
Food.Builder
meat()
Food.Builder
nutrition(int p_221456_1_)
Food.Builder
saturationMod(float p_221454_1_)
-
-
-
Field Detail
-
nutrition
private int nutrition
-
saturationModifier
private float saturationModifier
-
isMeat
private boolean isMeat
-
canAlwaysEat
private boolean canAlwaysEat
-
fastFood
private boolean fastFood
-
effects
private final java.util.List<com.mojang.datafixers.util.Pair<java.util.function.Supplier<EffectInstance>,java.lang.Float>> effects
-
-
Method Detail
-
nutrition
public Food.Builder nutrition(int p_221456_1_)
-
saturationMod
public Food.Builder saturationMod(float p_221454_1_)
-
meat
public Food.Builder meat()
-
alwaysEat
public Food.Builder alwaysEat()
-
fast
public Food.Builder fast()
-
effect
public Food.Builder effect(java.util.function.Supplier<EffectInstance> effectIn, float probability)
-
effect
@Deprecated public Food.Builder effect(EffectInstance p_221452_1_, float p_221452_2_)
Deprecated.
-
build
public Food build()
-
-