net.minecraft.world.food

public record FoodProperties

implements ConsumableListener

csz
net.minecraft.world.food.FoodProperties
net.minecraft.class_4174
net.minecraft.component.type.FoodComponent
net.minecraft.world.food.FoodInfo

Field summary

Modifier and TypeField
private final int
c
nutrition
comp_2491
nutrition
private final float
d
saturation
comp_2492
saturation
private final boolean
e
canAlwaysEat
comp_2493
canAlwaysEat
public static final com.mojang.serialization.Codec<FoodProperties>
a
DIRECT_CODEC
field_49992
CODEC
public static final StreamCodec<RegistryFriendlyByteBuf, FoodProperties>
b
DIRECT_STREAM_CODEC
field_49993
PACKET_CODEC

Constructor summary

ModifierConstructor
public (int nutrition, float saturation, boolean canAlwaysEat)

Method summary

Modifier and TypeMethod
public void
a(dhi arg0, bwg arg1, cxp arg2, czv arg3)
onConsume(Level arg0, LivingEntity arg1, ItemStack arg2, Consumable arg3)
method_62831(class_1937 arg0, class_1309 arg1, class_1799 arg2, class_10124 arg3)
onConsume(World arg0, LivingEntity arg1, ItemStack arg2, ConsumableComponent arg3)
public int
a()
nutrition()
comp_2491()
nutrition()
public float
b()
saturation()
comp_2492()
saturation()
public boolean
c()
canAlwaysEat()
comp_2493()
canAlwaysEat()