Jump to content

[1.11.2] Creating Ranged Mobs and Mounting Mobs on Horses


Recommended Posts

Hello, I'm current Attempting to implement 2 new mob types, one of which I'm planning to have mounted on a horse, and the other a ranged attacker.. 


Archer Villager


public class EntityVillagerArcher extends EntityVillagerSoldier implements IRangedAttackMob{


Horse Mounted Villager:

public class EntityVillagerCaptain extends EntityVillagerSoldier{


Completed Melee Villager:

public class EntityVillagerSoldier extends EntityVillager{


On the topic of the horse mounted Villager


I've attempted to copy some code from the spider class replacing the spider references with a new horse, but all it does is freeze my EntityVillagerCaptain once it's spawned. 


 EntityHorse horse = new EntityHorse(this.world);
	        horse.setPosition(this.posX, this.posY, this.posZ);


Some Notes:

The EntityVillagerCaptain jerks his arms and legs around rapidly.

The horse is nowhere to be seen.

And upon some debugging, the message:

[16:42:28] [Client thread/WARN]: Received passengers for unknown entity

IS also displayed in the console each to a EntityVillagerCaptain is spawned.


Is there something I'm doing wrong, or is there a better way to do this?


On the topic of the Archer Villager

My main problem is that the EntityAIAttackRangedBow requires the class to be an instance of the Abstract Skeleton Class .

However I can't make my Archers extend this class as my villager soldiers will start attacking them.


EntityAIAttackRangedBow(AbstractSkeleton skeleton, double speedAmplifier, int delay, float maxDistance)


Should I just make my own custom AI? or is there a workaround to my current problem with Villager Archer?



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.