mirror of https://github.com/FabricMC/yarn.git
68 lines
3.3 KiB
Plaintext
68 lines
3.3 KiB
Plaintext
CLASS net/minecraft/class_4174 net/minecraft/item/FoodComponent
|
|
COMMENT Represents the components that make up the properties of a food item.
|
|
FIELD field_18614 hunger I
|
|
FIELD field_18615 saturationModifier F
|
|
FIELD field_18616 meat Z
|
|
FIELD field_18617 alwaysEdible Z
|
|
FIELD field_18618 snack Z
|
|
FIELD field_18619 statusEffects Ljava/util/List;
|
|
METHOD <init> (IFZZZLjava/util/List;)V
|
|
ARG 1 hunger
|
|
ARG 2 saturationModifier
|
|
ARG 3 meat
|
|
ARG 4 alwaysEdible
|
|
ARG 5 snack
|
|
ARG 6 statusEffects
|
|
METHOD method_19230 getHunger ()I
|
|
COMMENT Gets the amount of hunger a food item will fill.
|
|
COMMENT
|
|
COMMENT <p>One hunger is equivalent to half of a hunger bar icon.
|
|
METHOD method_19231 getSaturationModifier ()F
|
|
COMMENT Gets the saturation modifier of a food item.
|
|
COMMENT
|
|
COMMENT <p>This value is typically used to determine how long a player can sustain the current hunger value before the hunger is used.
|
|
METHOD method_19232 isMeat ()Z
|
|
COMMENT Checks if a food item can be fed to dogs.
|
|
METHOD method_19233 isAlwaysEdible ()Z
|
|
COMMENT Checks if a food item can be eaten when the current hunger bar is full.
|
|
METHOD method_19234 isSnack ()Z
|
|
COMMENT Checks if a food item is snack-like and is eaten quickly.
|
|
METHOD method_19235 getStatusEffects ()Ljava/util/List;
|
|
COMMENT Gets a list of all status effect instances that may be applied when a food item is consumed.
|
|
COMMENT
|
|
COMMENT <p>The first value in the pair is the status effect instance to be applied.
|
|
COMMENT <p>The second value is the chance the status effect gets applied, on a scale between {@code 0.0F} and {@code 1.0F}.
|
|
CLASS class_4175 Builder
|
|
FIELD field_18620 hunger I
|
|
FIELD field_18621 saturationModifier F
|
|
FIELD field_18622 meat Z
|
|
FIELD field_18623 alwaysEdible Z
|
|
FIELD field_18624 snack Z
|
|
FIELD field_18625 statusEffects Ljava/util/List;
|
|
METHOD method_19236 meat ()Lnet/minecraft/class_4174$class_4175;
|
|
COMMENT Specifies that a food item can be fed to dogs.
|
|
METHOD method_19237 saturationModifier (F)Lnet/minecraft/class_4174$class_4175;
|
|
COMMENT Specifies the saturation modifier of a food item.
|
|
COMMENT
|
|
COMMENT <p>This value is typically used to determine how long a player can sustain the current hunger value before the hunger is used.
|
|
ARG 1 saturationModifier
|
|
COMMENT the saturation modifier
|
|
METHOD method_19238 hunger (I)Lnet/minecraft/class_4174$class_4175;
|
|
COMMENT Specifies the amount of hunger a food item will fill.
|
|
COMMENT
|
|
COMMENT <p>One hunger is equivalent to half of a hunger bar icon.
|
|
ARG 1 hunger
|
|
COMMENT the amount of hunger
|
|
METHOD method_19239 statusEffect (Lnet/minecraft/class_1293;F)Lnet/minecraft/class_4174$class_4175;
|
|
COMMENT Specifies a status effect to apply to an entity when a food item is consumed.
|
|
COMMENT This method may be called multiple times to apply several status effects when food is consumed.
|
|
ARG 1 effect
|
|
COMMENT the effect instance to apply
|
|
ARG 2 chance
|
|
COMMENT the chance the status effect is applied, on a scale of {@code 0.0F} to {@code 1.0F}
|
|
METHOD method_19240 alwaysEdible ()Lnet/minecraft/class_4174$class_4175;
|
|
COMMENT Specifies that a food item can be eaten when the current hunger bar is full.
|
|
METHOD method_19241 snack ()Lnet/minecraft/class_4174$class_4175;
|
|
COMMENT Specifies that a food item is snack-like and is eaten quickly.
|
|
METHOD method_19242 build ()Lnet/minecraft/class_4174;
|