Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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!

  • Author

Wow, I forgot the exclamation point. Didn't even see that, thanks, I knew it was something stupid.

Guest
This topic is now closed to further replies.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.