Jump to content

Recommended Posts

Posted

Hello, I'm current Attempting to implement 1 new mob type, which I'm planning to have mounted on a horse. 

 

Horse Mounted Villager:

public class EntityVillagerCaptain extends EntityVillagerSoldier{

 

Completed Melee Villager:

public class EntityVillagerSoldier extends EntityVillager{

 

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);
	        this.world.spawnEntity(horse);
	        this.startRiding(horse);

 

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?

 

Thanks.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

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