Перейти к содержимому
Mineforgian

Better Horse Feeding

Better Horse Feeding makes Golden Apples apply their effects to horses, as they should!

Загрузки
658
Подписчики
2
Обновлён
24 марта 2025 г.
Лицензия
Unlicense

Опубликован 24 марта 2025 г.

Better Horse Feeding makes Golden Apples apply their effects to horses when fed to a horse by a player.

Technical Information: This mod works by using SpongePowered Mixins to inject into the Java bytecode of Minecraft. Within the AbstractHorse class (used as the base for the main Horse entity type) there is a method with a mapped name of "handleEating", which has two parameters; one for the Player feeding the horse, another for the ItemStack being fed to the horse. BHF injects into the "head" of this method, applying the effects (if any) from the food being fed to the horse. It's that simple!

Ченджлог

1.0.0Релиз1.20.1 · 24 марта 2025 г.

SpongePowered Mixin Injection into HEAD of handleEating method from AbstractHorse. Using getFoodProperties, check if getEffects is not null, then apply each effect if not empty.

1.0.0Релиз1.21.1 · 24 марта 2025 г.

SpongePowered Mixin Injection into HEAD of handleEating method from AbstractHorse. Using get(DataComponents.FOOD), check if effects is not null, then apply each effect if not empty.

Комментарии

Загружаем…