Class FoodProperties
java.lang.Object
com.github.retrooper.packetevents.protocol.component.builtin.item.FoodProperties
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionFoodProperties
(int nutrition, float saturation, boolean canAlwaysEat) FoodProperties
(int nutrition, float saturation, boolean canAlwaysEat, float eatSeconds, List<FoodProperties.PossibleEffect> effects) FoodProperties
(int nutrition, float saturation, boolean canAlwaysEat, float eatSeconds, List<FoodProperties.PossibleEffect> effects, @Nullable ItemStack usingConvertsTo) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Has been moved toItemConsumable
in 1.21.2boolean
float
Has been moved toItemConsumable
in 1.21.2Has been moved toItemConsumable
in 1.21.2int
float
@Nullable ItemStack
Has been moved toItemConsumable
in 1.21.2int
hashCode()
boolean
static FoodProperties
read
(PacketWrapper<?> wrapper) void
setCanAlwaysEat
(boolean canAlwaysEat) void
setEatSeconds
(float eatSeconds) Has been moved toItemConsumable
in 1.21.2void
setEffects
(List<FoodProperties.PossibleEffect> effects) Has been moved toItemConsumable
in 1.21.2void
setNutrition
(int nutrition) void
setSaturation
(float saturation) void
setUsingConvertsTo
(@Nullable ItemStack usingConvertsTo) Has been moved toItemConsumable
in 1.21.2static void
write
(PacketWrapper<?> wrapper, FoodProperties props)
-
Constructor Details
-
FoodProperties
public FoodProperties(int nutrition, float saturation, boolean canAlwaysEat) -
FoodProperties
@Obsolete public FoodProperties(int nutrition, float saturation, boolean canAlwaysEat, float eatSeconds, List<FoodProperties.PossibleEffect> effects) -
FoodProperties
@Obsolete public FoodProperties(int nutrition, float saturation, boolean canAlwaysEat, float eatSeconds, List<FoodProperties.PossibleEffect> effects, @Nullable @Nullable ItemStack usingConvertsTo)
-
-
Method Details
-
read
-
write
-
getNutrition
public int getNutrition() -
setNutrition
public void setNutrition(int nutrition) -
getSaturation
public float getSaturation() -
setSaturation
public void setSaturation(float saturation) -
isCanAlwaysEat
public boolean isCanAlwaysEat() -
setCanAlwaysEat
public void setCanAlwaysEat(boolean canAlwaysEat) -
getEatSeconds
@Obsolete public float getEatSeconds()Has been moved toItemConsumable
in 1.21.2 -
setEatSeconds
@Obsolete public void setEatSeconds(float eatSeconds) Has been moved toItemConsumable
in 1.21.2 -
addEffect
Has been moved toItemConsumable
in 1.21.2 -
getEffects
Has been moved toItemConsumable
in 1.21.2 -
setEffects
Has been moved toItemConsumable
in 1.21.2 -
getUsingConvertsTo
Has been moved toItemConsumable
in 1.21.2 -
setUsingConvertsTo
Has been moved toItemConsumable
in 1.21.2 -
equals
-
hashCode
public int hashCode()
-