From 944e85408f1c2482d357f0a549c96e715859fba5 Mon Sep 17 00:00:00 2001 From: liach <7806504+liach@users.noreply.github.com> Date: Sun, 18 Apr 2021 20:03:44 +0700 Subject: [PATCH] A few more constant classes (#2319) * A few more constant classes Signed-off-by: liach * Drop the name of class 6148 while keeping the javadocs Signed-off-by: liach Co-authored-by: liach --- mappings/net/minecraft/class_6148.mapping | 7 ++++++ .../entity/player/HungerConstants.mapping | 24 +++++++++++++++++++ .../entity/player/HungerManager.mapping | 4 ++-- .../minecraft/unused/FixedDataSetter.mapping | 10 ++++++++ 4 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 mappings/net/minecraft/class_6148.mapping create mode 100644 mappings/net/minecraft/entity/player/HungerConstants.mapping create mode 100644 mappings/net/minecraft/unused/FixedDataSetter.mapping diff --git a/mappings/net/minecraft/class_6148.mapping b/mappings/net/minecraft/class_6148.mapping new file mode 100644 index 0000000000..45d727c645 --- /dev/null +++ b/mappings/net/minecraft/class_6148.mapping @@ -0,0 +1,7 @@ +CLASS net/minecraft/class_6148 + COMMENT A class holding unknown constants. + COMMENT + COMMENT @apiNote From the package structure, this class appears to be world-related, + COMMENT but it seems to be the exclusive class in a package. Its neighboring packages + COMMENT are about portal teleporting and persistent state, yet these constants don't + COMMENT seem to relate to those. diff --git a/mappings/net/minecraft/entity/player/HungerConstants.mapping b/mappings/net/minecraft/entity/player/HungerConstants.mapping new file mode 100644 index 0000000000..fdb527cd99 --- /dev/null +++ b/mappings/net/minecraft/entity/player/HungerConstants.mapping @@ -0,0 +1,24 @@ +CLASS net/minecraft/class_6075 net/minecraft/entity/player/HungerConstants + COMMENT Some constants on hunger values. + COMMENT + COMMENT @see HungerManager + FIELD field_30704 FULL_FOOD_LEVEL I + COMMENT The maximum food level ({@value}) allowed in a hunger manager. + FIELD field_30706 INITIAL_SATURATION_LEVEL F + COMMENT The initial saturation level ({@value}) for a newly created hunger manager. + FIELD field_30708 EXHAUSION_UNIT F + COMMENT A value {@value} that when the exhausion reaches, the exhausion minuses itself + COMMENT by to reduce the saturation or food level. + FIELD field_30709 SLOW_HEALING_STARVING_INTERVAL I + COMMENT When the food tick is a multiple of {@value}, the hunger manager may perform + COMMENT slow healing or starving logic. + FIELD field_30710 FAST_HEALING_INTERVAL I + COMMENT When the food tick is a multiple of {@value}, the hunger manager may perform + COMMENT fast healing logic. + FIELD field_30711 SLOW_HEALING_FOOD_LEVEL I + COMMENT The minimum food level ({@value}) required for the slow-healing mechanism. + FIELD field_30712 EXHAUSION_PER_HITPOINT I + COMMENT The exhausion from healing each hitpoint ({@value}), used for both fast and + COMMENT slow healing mechanisms. + FIELD field_30713 STARVING_FOOD_LEVEL I + COMMENT The maximum food level ({@value}) permitted for the starving mechanism to run. diff --git a/mappings/net/minecraft/entity/player/HungerManager.mapping b/mappings/net/minecraft/entity/player/HungerManager.mapping index 71ac0906ff..3350077699 100644 --- a/mappings/net/minecraft/entity/player/HungerManager.mapping +++ b/mappings/net/minecraft/entity/player/HungerManager.mapping @@ -2,7 +2,7 @@ CLASS net/minecraft/class_1702 net/minecraft/entity/player/HungerManager FIELD field_7752 exhaustion F FIELD field_7753 foodSaturationLevel F FIELD field_7754 prevFoodLevel I - FIELD field_7755 foodStarvationTimer I + FIELD field_7755 foodTickTimer I FIELD field_7756 foodLevel I METHOD method_35217 getPrevFoodLevel ()I METHOD method_35218 setExhaustion (F)V @@ -13,7 +13,7 @@ CLASS net/minecraft/class_1702 net/minecraft/entity/player/HungerManager ARG 2 stack METHOD method_7580 setFoodLevel (I)V ARG 1 foodLevel - METHOD method_7581 setSaturationLevelClient (F)V + METHOD method_7581 setSaturationLevel (F)V ARG 1 saturationLevel METHOD method_7582 writeNbt (Lnet/minecraft/class_2487;)V ARG 1 nbt diff --git a/mappings/net/minecraft/unused/FixedDataSetter.mapping b/mappings/net/minecraft/unused/FixedDataSetter.mapping new file mode 100644 index 0000000000..f27dfaaf43 --- /dev/null +++ b/mappings/net/minecraft/unused/FixedDataSetter.mapping @@ -0,0 +1,10 @@ +CLASS net/minecraft/class_6184 net/minecraft/unused/FixedDataSetter + COMMENT A functional (single-abstract-method) interface with a method to set fixed + COMMENT data. + COMMENT + COMMENT @apiNote Since the {@link #setFixedData} is not obfuscated, it might have been + COMMENT used by some other (removed) code in a bootstrap method as a lambda. This class + COMMENT is not used anywhere otherwise. + METHOD setFixedData (Ljava/lang/String;Ljava/lang/Object;)V + ARG 1 key + ARG 2 value