MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / readNBT

Method readNBT

src/main/java/net/minecraft/util/FoodStats.java:94–103  ·  view source on GitHub ↗

Reads the food data for the player.

(NBTTagCompound p_75112_1_)

Source from the content-addressed store, hash-verified

92 * Reads the food data for the player.
93 */
94 public void readNBT(NBTTagCompound p_75112_1_)
95 {
96 if (p_75112_1_.hasKey("foodLevel", 99))
97 {
98 this.foodLevel = p_75112_1_.getInteger("foodLevel");
99 this.foodTimer = p_75112_1_.getInteger("foodTickTimer");
100 this.foodSaturationLevel = p_75112_1_.getFloat("foodSaturationLevel");
101 this.foodExhaustionLevel = p_75112_1_.getFloat("foodExhaustionLevel");
102 }
103 }
104
105 /**
106 * Writes the food data for the player.

Callers 1

readEntityFromNBTMethod · 0.45

Calls 3

hasKeyMethod · 0.80
getIntegerMethod · 0.80
getFloatMethod · 0.45

Tested by

no test coverage detected