Jump to content

[1.11.2] Having a Throwable Entity Bounce & Land


Halpert

Recommended Posts

Hello!
I am fairly new at this, so I apologize in advance if I don't make sense.

I have created an item along with its entity class, which extends EntityThrowable. I currently have it rendering as a Snowball.
I am now at the point where I want to control how it behaves once it's thrown. Ideally, I would like it to bounce and eventually land on the ground.
I only have the 3 constructors and and empty onImpact method in the Entity class right now.
When I test it out now, the item shoots out and keeps going, even going through blocks. I imagine I would have to do some manipulation involving motion X/Y/Z and pos X/Y/Z, but I'm not sure what that would be. I tried looking into the EntityThrowable class to see what was going on in there, but I'm not even sure I know what I'm looking for.

 

Could someone please give me some guidance on how I can achieve this effect?

Link to comment
Share on other sites

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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