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

The title says. If i modify updateRiderPosition() so that the rider is outside the collision box, everything is fine, but when it's inside, the whole thing begins to twitch and spasm. Any ideas?

If i helped you, don't forget pressing "Thank You" button. Thanks for your time.

  • 2 weeks later...
  • Author

Bump.

If i helped you, don't forget pressing "Thank You" button. Thanks for your time.

@Override
public void applyEntityCollision(Entity par1Entity)
{
    if (par1Entity != riddenByEntity && par1Entity.canBePushed())
        applyEntityCollision(par1Entity);
}

 

 

@Override
public void applyEntityCollision(Entity par1Entity)
{
    if (par1Entity != riddenByEntity && par1Entity.canBePushed())
        applyEntityCollision(par1Entity);
}

 

And the reason he could say this is because he guessed you're code being the way it is, since you didn't show you're problem code ;)

If you guys dont get it.. then well ya.. try harder...

  • Author

@Override
public void applyEntityCollision(Entity par1Entity)
{
    if (par1Entity != riddenByEntity && par1Entity.canBePushed())
        applyEntityCollision(par1Entity);
}

I hope you were not going to advise me to make an infinite loop, and just forgot super. prefix.

I've fixed it — the problem was in getCollisionBox(). Now i have

@Override
    public AxisAlignedBB getCollisionBox(Entity par1Entity){
    	if (par1Entity != riddenByEntity && par1Entity.ridingEntity != this){
    		return par1Entity.boundingBox;
    	}
    	return null;
    }

and it's fine.

If i helped you, don't forget pressing "Thank You" button. Thanks for your time.

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.