
BefriendMobs Framework
A library for creating friendly mobs from any exisiting mobs.
- Загрузки
- 6K
- Подписчики
- 7
- Обновлён
- 11 ноября 2023 г.
- Лицензия
- LGPL-3.0-or-later
Опубликован 11 ноября 2023 г.
BefriendMobs Framework is intended to help modders easily create features of befriending (or say taming) mobs and friendly mobs despite their type hierarchy.
For example, most vanilla tamable mobs (e.g. wolf) inherit TamableMob class. If you want to make hostile mobs (e.g. Zombie) friendly or tamed, only using vanilla API it may become complex. Then you can easily create a subclass of Zombie (or anything else extends Mob) with BefriendMobs without using any vanilla TamableMob interfaces, and without considering about the type hierarchy of the existing mobs.
Note: This lib is still in development and the API may change on update, so it's not recommended to use this lib for development NOW. If it must be used, it's recommended to specify the lib version in the mod instead of giving a range.
Github: https://github.com/SodiumZH/Befriend-Mobs
For example depending mod, see: https://modrinth.com/mod/befriendmobs-days-with-monster-girls
For earlier versions, see: https://www.curseforge.com/minecraft/mc-mods/befriendmobs
It's always welcomed to request for more features, especially when position where you want to insert code doesn't provide an event, or properties you expect to be variable is hard-coded.
QQ Group ID: 336794947 (Chinese language)
Ченджлог
0.2.18Релиз1.20.1 · 11 ноября 2023 г.
BefriendMobs
Added Mixin. Now adding BefriendMobs API as dependency requires to add Mixin in build.gradle. For details see build.gradle in mod Days with Monster Girls.
Added HealingItemTable to handle healing. It accepts 4 methods to check if can use: item, tag, item stack predicate and item registry key. Generally it accepts only one of them. Adding multiple methods is allowed but not recommended.
Changed IBefriendedMob#getHealingItems to HealingItemTable. Deprecated IBefriendedMob#getNonconsumingHealingItems.
Changed CHealingHandler to adapt HealingItemTable. Now ``CHealingHandler#applyHealingItemaccepts cooldown ticks input. DeprecatedCHealingHandler#getHealingCooldownTicks`.
NaUtils
Added Mixin. Now adding BefriendMobs API as dependency requires Mixin in build.gradle. For details see build.gradle in mod Days with Monster Girls.
Added ItemEntityHurtEvent and NonLivingEntityHurtEvent, allowing to cancel damages to non-living entities.
Added ConditionalAttributeModifier as an auto-updating AttributeModifier added and removed depending on a Predicate as condition.
AddedObjectOrSupplier as a supplier either from a static object or a functional Supplier.
Added ObjectOrKey as a supplier either from a static object or a key of registry.
Added ItemOrKey and EntityTypeOrKey as wrappers for ObjectOrKey of Item and EntityType .
Added DynamicObjectKeyMap as a mapping from registered objects to something. It has ObjectOrKey as keys and ObjectOrSupplier as values, allowing to dynamically find objects from registries and get volatile values (e.g. max health) from static map objects.
Added DynamicItemKeyMap and DynamicEntityTypeKeyMap as wrappers of DynamicObjectKeyMap of Item and EntityType.
0.0.18Бета1.18.2 · 11 ноября 2023 г.
BefriendMobs
Added Mixin. Now adding BefriendMobs API as dependency requires to add Mixin in build.gradle. For details see build.gradle in mod Days with Monster Girls.
Added HealingItemTable to handle healing. It accepts 4 methods to check if can use: item, tag, item stack predicate and item registry key. Generally it accepts only one of them. Adding multiple methods is allowed but not recommended.
Changed IBefriendedMob#getHealingItems to HealingItemTable. Deprecated IBefriendedMob#getNonconsumingHealingItems.
Changed CHealingHandler to adapt HealingItemTable. Now ``CHealingHandler#applyHealingItemaccepts cooldown ticks input. DeprecatedCHealingHandler#getHealingCooldownTicks`.
NaUtils
Added Mixin. Now adding BefriendMobs API as dependency requires Mixin in build.gradle. For details see build.gradle in mod Days with Monster Girls.
Added ItemEntityHurtEvent and NonLivingEntityHurtEvent, allowing to cancel damages to non-living entities.
Added ConditionalAttributeModifier as an auto-updating AttributeModifier added and removed depending on a Predicate as condition.
AddedObjectOrSupplier as a supplier either from a static object or a functional Supplier.
Added ObjectOrKey as a supplier either from a static object or a key of registry.
Added ItemOrKey and EntityTypeOrKey as wrappers for ObjectOrKey of Item and EntityType .
Added DynamicObjectKeyMap as a mapping from registered objects to something. It has ObjectOrKey as keys and ObjectOrSupplier as values, allowing to dynamically find objects from registries and get volatile values (e.g. max health) from static map objects.
Added DynamicItemKeyMap and DynamicEntityTypeKeyMap as wrappers of DynamicObjectKeyMap of Item and EntityType.
0.1.18Бета1.19.2 · 11 ноября 2023 г.
BefriendMobs
Added Mixin. Now adding BefriendMobs API as dependency requires to add Mixin in build.gradle. For details see build.gradle in mod Days with Monster Girls.
Added HealingItemTable to handle healing. It accepts 4 methods to check if can use: item, tag, item stack predicate and item registry key. Generally it accepts only one of them. Adding multiple methods is allowed but not recommended.
Changed IBefriendedMob#getHealingItems to HealingItemTable. Deprecated IBefriendedMob#getNonconsumingHealingItems.
Changed CHealingHandler to adapt HealingItemTable. Now ``CHealingHandler#applyHealingItemaccepts cooldown ticks input. DeprecatedCHealingHandler#getHealingCooldownTicks`.
NaUtils
Added Mixin. Now adding BefriendMobs API as dependency requires Mixin in build.gradle. For details see build.gradle in mod Days with Monster Girls.
Added ItemEntityHurtEvent and NonLivingEntityHurtEvent, allowing to cancel damages to non-living entities.
Added ConditionalAttributeModifier as an auto-updating AttributeModifier added and removed depending on a Predicate as condition.
AddedObjectOrSupplier as a supplier either from a static object or a functional Supplier.
Added ObjectOrKey as a supplier either from a static object or a key of registry.
Added ItemOrKey and EntityTypeOrKey as wrappers for ObjectOrKey of Item and EntityType .
Added DynamicObjectKeyMap as a mapping from registered objects to something. It has ObjectOrKey as keys and ObjectOrSupplier as values, allowing to dynamically find objects from registries and get volatile values (e.g. max health) from static map objects.
Added DynamicItemKeyMap and DynamicEntityTypeKeyMap as wrappers of DynamicObjectKeyMap of Item and EntityType.
Комментарии
Загружаем…