Jump to content

[Solved][1.8] "Ghost" entity not responding to movement, gravity, etc


theshadowzz

Recommended Posts

So I'm attempting to get around the new restriction on eyeHeight by using setRenderViewingEntity and a camera entity, but I'm having a problem with my entity not gaining motion. It works absolutely fine if I spawn it in with a spawn egg, so I assume I'm making a stupid mistake with how I'm spawning it.

 

 

 

public void spawnCamera(){

if(this.getCamera() == null && player.worldObj.isRemote){

camera = new EntitySlideCam(player.worldObj);

camera.setLocationAndAngles(player.posX, player.posY, player.posZ, player.rotationYaw, player.rotationPitch);

camera.worldObj.spawnEntityInWorld(camera);

}

}

 

 

It's inside a class where I keep extended properties for the player, and I'm pretty sure it has to have something to do with where I'm getting the world. Is there anything that spawn eggs do that I'm not doing? I believe it's registered correctly, or it shouldn't work with the spawn egg.... I'm very confused with it. None of the code in the entity is interfering with it because I also can't manually spawn this test entity and have the motion update:

 

 

public class EntityTest extends EntityMob{

public EntityTest(World par1World) {

super(par1World);

}

 

 

@Override

public void onUpdate(){

super.onUpdate();

this.motionX = 100;

}

}

 

 

 

Let me know if you can shed any insight on the issue!

Link to comment
Share on other sites

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.