Jump to content

[1.7.10] Creating a custom material for a custom liquid


salvestrom

Recommended Posts

creating a custom liquid using material.water is great. except for a few cosmetic issues. one of which is the bubbles and splashes entities make as they run through the custom liquid. this is done by the handleWaterMovement() in the Entity class. I created a LivingUpdateEvent and put in a near duplicate of this method, designed for a custom material. At this point all the watery movement was lost because the moveEntityWithHeading() method is hard coded to check for material.water and lava. I seem to be looking then, at overwriting that method. My attempt to do so failed because the game was adding the movement from my own method to the games moveEntity...() method, while the latter also treated entities as being on the ground. In other words nothing was really solved.

 

So I feel like I'm rebuilding a ferrarri engine for the sake of a new paint job.

 

This is my first mod and I am actually willing to suffer the cosmetic blips if the alternative is something more major, at least, for this go around. I'm too close to being finished, otherwise.

 

Any indication of how to procede would be greatly appreciated.

Link to comment
Share on other sites

So I immediately went back to eclipse after posting and tracked where moveentityWithHeading() is called from. Apparently, its in the onLivingUpdate() which is called by onUpdate() which I'm already hooking into.

 

Presumably then, I can cancel, and replace both methods and then rewrite moveE...() to incorporate my custom material...?

 

 

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.