TamableAPI
A Utility API that set ups alot of the generic code used for Taming, Breeding or Aging, which can be applied to any Entity that extends the `Mob` class with nothing more than an interface!
介绍
This is an API meant to be used by other mods and is not a standalone mod, its the thirdAPI I’ve ever made which actually also uses the other two API’s are dependencies, its intented to provide a base setup for making any mob in the game Tamable, Collarable, Ageable & Breedable.
By doing nothing more than making a mob implement a few interfaces the mob will support player taming with food, sitting and standing modes (without animation), feeding to heal a tamed pet, aging, forced aging, breeding, following / teleport behaviour, defend behaviour, colored collar that can be dyed (collar does not render).. basically anything a tamed wolf or cat does.
Any mob specific behaviour such as sitting animation / mode or rendering of a collar is left up to the mods using this API to implements, additionally there is methods that can be overriden to change the settings of the automatically setup goals that are added to mobs based on their interfaces.
Any API I make is mainly meant for usage in something else I’m working on or in general for my mods, however they are available for public use if a user desires
All infomation required to use this API can be found here;
- Tamable Interface used to make any mob tamable with basic tame behaviour
- Collarable Interface used to add built-in collar data to any mob (needs a renderer)
- Breedable Interface used to allow mobs to breed (implementing this also implements Ageable)
- Ageable Interface used to add aging behaviour to any mob with a smaller baby visual model
- HasBabyModel Interface used to prevent the model being half scale as a baby (for when babies use custom models)
Additonal Notes: if you do not override the Tamable.isTamableFood(ItemStack) method then it will either default to any items tagged under the namespace of `tamable:{mob class name}_food` or to the result of Animal.isFood(ItemStack) if the mob is an instance of Animal and also some mobs override interaction behaviour in a way that prevents the taming, breeding & collar interactions from triggering, you will need to call them manually with a mixin to fix that.
常见问题
TamableAPI 支持哪些 Minecraft 版本?
TamableAPI 支持 Minecraft Java 版 1.21.8,可用的加载器:NeoForge。下载时注意选择和你游戏版本一致的文件。
TamableAPI 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
spiderman31807 的其他作品
查看全部 →Zombie Infection
僵尸会感染玩家而非将其杀死;感染后,玩家的行为将与僵尸完全相同。
Zombie Infection
僵尸会感染玩家,而不是杀死玩家。感染后,玩家的行为与僵尸完全相同。
Tameable Spiders
一款使用 MCreator 制作的模组,可以驯服蜘蛛
Villager Inventory
为村民背包添加GUI,让繁殖村民更轻松!
评论
登录后评论和评分