How to add more types of modded mobs
thefrogline opened this issue ยท 3 comments
Hello! I want to add a custom mob to the mod, I already know how your ability registration system works and how to create one, but the only thing that fails me is how do I add my entity from another mod), to yours, I know that It is by entity type, the most I get is to obtain it through the entity regirstry, but I can't put it, I only need that, I don't know if it's possible just obtaining it by name, maybe an example would be nice to leave it alone Does anyone have any doubts in the future? ๐
Hi - Identity will automatically pick up any LivingEntity
added to the game (and will include an option for it in the menu). If you want to register an ability for a mob you don't control from a separate mod, it would be something like this...
public class CustomMobAbility extends IdentityAbility<OtherModEntityType> {
// ...
}
AbilityRegistry.register(EntityTypes.OTHER_MOD_TYPE, new CustomMobAbility());
The you need the entity class & type for this. If you don't have access to the entity class (eg. the the other mod isn't loaded in your dev environment), you can use IdentityAbility<LivingEntity>
, and then look up the EntityType
by id. Does this help to answer your question?
Hi - Identity will automatically pick up any
LivingEntity
added to the game (and will include an option for it in the menu). If you want to register an ability for a mob you don't control from a separate mod, it would be something like this...public class CustomMobAbility extends IdentityAbility<OtherModEntityType> { // ... }AbilityRegistry.register(EntityTypes.OTHER_MOD_TYPE, new CustomMobAbility());The you need the entity class & type for this. If you don't have access to the entity class (eg. the the other mod isn't loaded in your dev environment), you can use
IdentityAbility<LivingEntity>
, and then look up theEntityType
by id. Does this help to answer your question?
Maybe in one of the next updates you should add a GUI for it
I did it, thank you very much, sorry I'm something new in this topic of using forge apis, also a doubt, with the topic of the arms would it be the same? why use
EntityArms.register(....);
and it didn't work, do I have to register something else, or only from there? (srry my bad english jeje)