Skip to content

Nutrition ​

8 merged pull requests.

Changes ​

  • #39 Created NutritionCommand and NutrientArgumentType using Brigadier. Removed old ChatCommand class. Updated readme and localization strings. - @serenibyss
    • Added: Brigadier-based /nutrition command, NutrientArgumentType for command argument parsing
    • Removed: ChatCommand (old implementation)
  • #38 Adds NutritionConfig annotated with the GTNHLib Config API and registers it through ConfigurationManager. The old utility.Config class is removed and all usages are switched to it. - @serenibyss
    • Added: GTNHLib-style Nutrition config
    • Removed: old Forge Configuration class
  • #34 Fixed corner texture rendering in GUI (top-right and bottom-left). Fixed hover texture. Updated config to center nutrition button on slot. - @Ranzuu
    • Fixed: Corner texture rendering, Hover texture appearance

Bug Fixes ​

  • #40 NutritionManager.set and setAll now pop the non-food hunger change stack, and popNonFoodHungerChange checks for an empty stack before popping. INutritionManager gains addAll overloads, and EventEatFood uses addAll instead of popping manually. - @serenibyss
    • Added: addAll methods in the Nutrition API
    • Fixed: crash from popping an empty non-food hunger stack
    • Closes GTNH#26140
  • #36 Updated nutrient config file to use correct spelling. - @Ranzuu
    • Fixed: Ginkgo nutrient spelling
  • #32 Removed EventWorldTick and split its logic into EventClientTick (client-only) and server-side tick logic moved to main event handler. Eliminated improper world server retention. - @Alexdoru
    • Added: EventClientTick for client-side nutrition updates
    • Removed: EventWorldTick
    • Fixed: World server memory leak in EventWorldTick
  • #30 Replaced the WitcheryHelper/ModHelperManager module setup, which never initialised, with a WitcheryEventHandler registered in load() when witchery is loaded and Config.witcheryCompatEnable is set. NutrientManager.setVampireFoodAmount scales nutrition between the configured vampire min and max by vampire level and blood ratio, and syncs to the client on change. - @YamiKami-Sama
    • Added: config options for vampire nutrition min and max, config option to disable Witchery compatibility
    • Fixed: Witchery vampire compatibility not initialised, no nutrition floor for vampires
    • Closes GTNH#22629

Internal / Refactor ​

  • #37 Replaced NutrientManager and the PlayerDataHandler data path with a new api package (INutritionManager, NutritionManager) that syncs to clients when the server modifies values. Removed EventClientTick, reworked the death, eat, join and world tick handlers, and bumped AppleCore and GTNHLib. - @serenibyss
    • Added: INutritionManager API for other mods
    • Removed: Client tick nutrition normalisation event

Contributors ​

Everyone who authored, reviewed or co-authored a change on this page, with how many of them:

@serenibyss (4), @UltraProdigy (3), @Ranzuu (2), @Alexdoru (1), @Algent (1), @Caedis (1), @DarkShadow44 (1), @jordanamr (1), @MalTeeez (1), @MeiTianyou (1), @PLASMAchicken (1), @Worive (1), @YamiKami-Sama (1)