Jump to content

Recommended Posts

Posted (edited)

I'm trying to create an item that allows you to take over a living entity on right click, possibly leaving the players body where it is. To leave the players body I think I just have to create a custom entity and spawn it where the player was with players data.

How do I go about actually taking over the living entity? I think there are two possibilities:

1. There is a relatively easy way that allows control over a living entity and moves the players camera position to the eye height of the entity, already built into Minecraft/Minecraft Forge.

2. Despawn the living entity (or EntityLiving::setDead()) and store living entity data in player, give the player the model of the living entity that was right clicked, and set the player position to the living entities position. Then when the player wants to switch back do the opposite.

Edited by Kriptikz
  • Like 1
Posted

There's a whole tangle of code associated with being a player, so I think you're going to need to go with an extension of EntityPlayer. That means try the substitution(s) and re-skin.

  • Like 2

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted

See if you can find the source for the Morph Mod

  • Like 2

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • 1 year later...
  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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