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

I don't think it is normal behavior to be able to stand on top of an entity, right? Plus my custom entity can't be pushed out of the way.

 

Now I thought the canBePushed() method was the one that controlled this. I overrode it to set it to true but still seems to have the same behavior.

 

There is another method called canBeCollidedWith() but I think that also affects attacking and so don't think I should mess with that one, right?

 

I crawled through the vanilla code and most living entities set the canBePushed() to return !this.isDead() so returning true should be fine for my purpose.

 

What am I missing? In my entity I'm controlling the motion tightly, so I suspect that the problem is that when it tries to push me I'm overriding it with motion all 0. How would I let the motion from a push happen -- is there some sort of indication that it has been pushed?

 

If there is no indication that it is in the middle of a push, I guess it must work with a "friction" sort of mechanism. I know that vanilla does that (always multiplies motion by something like 0.93 or something). So I guess maybe I need to implement that?

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

  • Author

Okay, yeah the problem was I was forcing the motion to 0 so any pushing was being canceled. Instead I only set it to 0 at point when entity lands on ground, then afterwards allow it to be pushed with friction effect. SOLVED.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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...

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.