Jump to content

[1.10.2] Change Entity motion


Koward

Recommended Posts

Hook into WorldTickEvent (pick one phase) and change stuff with World#entityList (name varies, I don't remember).

 

This way you can "almost" replicate LivingUpdateEvent - difference is you can't cancel it and is happens in slightly different time frame (which might make it "different" when changing stuff such as entity's motions).

 

For more look where said event is called from. (you will probabyl want to use START phase).

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

Unfortunately it just mess up the block movement every tick, it's not the effect I'm looking for at all. I would basically like items to stay, in water, at the height I throw them. Avoid them to sink. Here the standard behavior happens between each triggering of the event so it sinks a bit, then goes back up a bit, etc and in the end the sinking wins.

Link to comment
Share on other sites

All items or just yours? You can return custom EntityItem from Item class. Something like #getEntityItem and #hasCustomEntityItem (again - I don't remember naming).

 

Edit:

For all others you can do the same with EntityJoinWorldEvent detect and spawn your own custom EntityItem.

 

P.S: In future - start with what you said in last post, just state your end goal.

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

I needed this for all items.. *Sigh* I guess it seems I'll have to customize every single Item in Minecraft if I ever want to do that.

 

P.S: In future - start with what you said in last post, just state your end goal.

 

I often like to do generic things that can have lots of uses, but you're right I should have added a clear example.

 

 

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.