Skip to content

Commit

Permalink
Fix FoodComponent constructor having outdated names (FabricMC#3908)
Browse files Browse the repository at this point in the history
For some reason, likely due to its use of generics in its record components, the FoodComponent record still uses a separate constructor which is visible using some decompilers, and had wrong and outdated mappings for its arguments which weren't visible in enigma. This manually fixes the arguments to match the exposed record component names.
  • Loading branch information
Shnupbups authored Jun 29, 2024
1 parent 5c2605e commit c003613
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions mappings/net/minecraft/component/type/FoodComponent.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ CLASS net/minecraft/class_4174 net/minecraft/component/type/FoodComponent
FIELD field_49993 PACKET_CODEC Lnet/minecraft/class_9139;
FIELD field_49994 DEFAULT_EAT_SECONDS F
METHOD <init> (IFZFLjava/util/Optional;Ljava/util/List;)V
ARG 1 hunger
ARG 2 saturationModifier
ARG 3 meat
ARG 1 nutrition
ARG 2 saturation
ARG 3 canAlwaysEat
ARG 4 eatSeconds
ARG 5 usingConvertsTo
ARG 6 effects
METHOD method_58399 getEatTicks ()I
METHOD method_58400 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App;
ARG 0 instance
Expand Down

0 comments on commit c003613

Please sign in to comment.