New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entity#isInWater, Entity#isTouchingWater and Entity#isInsideWater are confusing names. #954
Comments
Maybe we could rename WolfEntity#isWet to |
My problem by renaming |
Could always be |
Since the |
Depends. Wolfs shake their body when they are wet, and if they are wet water particles are rendered on them as well. |
@Runemoro I agree with that. Might be Situation might be that the method on wolves predates the methods on Entity. |
+1 for |
This issue is fixed with #1058 now. |
Methods
isInWater
andisInsideWater
are currently very confusing: the methods have very similar names but doesn't return the same result at all.isInWater
returns true only when the full hitbox is in water, and should be renamed toisSubmergedInWater
. AndisInWater
returns the value of the fieldinWater
which is set byisSubmergedIn(FluidTags.WATER, true)
.Renaming the
inWater
field should also be done then.isInsideWater
returns true when the hitbox hits water, the method should be renamed toisTouchingWater
. The associated fieldinsideWater
should also be renamed.As
isTouchingWater
already exists, the method should also be renamed.The name
isWet
came in some minds but it might conflict withWolfEntity#isWet
which is client-side only.The text was updated successfully, but these errors were encountered: