salvestrom Posted October 30, 2015 Share Posted October 30, 2015 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. Quote Link to comment Share on other sites More sharing options...
salvestrom Posted October 30, 2015 Author Share Posted October 30, 2015 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...? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.