-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
[1.21] Fix fluid pushing, update wasTouchingWater
flag again
#1586
base: 1.21.x
Are you sure you want to change the base?
Conversation
|
@GizmoTheMoonPig, this PR introduces breaking changes.
|
After a little discussion on the neo discord, I moved this to use a fluid type property instead of the vanilla tag. The name isnt final by means (I'm very bad at naming things, please give me suggestions!), but this is unfortunately still a breaking change as I needed to return whether this property is true or not in the |
wasTouchingWater
flag againwasTouchingWater
flag again
UPDATE: someone asked me about looking into another fluid issue and I fell down a rabbit hole trying to fix that. I had to adjust |
vec3 = vec3.multiply((double)f, 0.8F, (double)f); | ||
this.setDeltaMovement(this.getFluidFallingAdjustedMovement(d1, flag, vec3)); | ||
- } else { | ||
+ } else if (this.isInLava() && this.isAffectedByFluids() && !this.canStandOnFluid(fluidState)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this isInLava method call supposed to be (this.isInFluidType(fluidstate) && fluidstate.getFluidType() != net.neoforged.neoforge.common.NeoForgeMod.LAVA_TYPE.value())
to match what you did above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In all honesty I have no idea. I just replicated all the changes as they used to be in 1.21.1 and it works fine. I'll see if its necessary for it to be like this
@GizmoTheMoonPig, this pull request has conflicts, please resolve them for this PR to move forward. |
Hello once again!
As people are probably well aware of by now, I'm working on a Betweenlands port. Betweenlands has a "swamp water" fluid that is mostly similar to vanilla water, but I can't use vanilla water for a few various reasons unrelated to this discussion. I noticed while working through the fluid logic that there was no way to get vanilla aquatic animals to swim in this water. I tracked down the issue and found it was related to the
isInWater
method in the entity class, which uses thewasTouchingWater
boolean. This boolean will never be set to true if the entity is not in vanilla water. Now, the method responsible for changing this uses the vanilla water tag, but for some reason, Neo changes the tag check to simply just be a fluid type check. I'm not quite sure why this is, so I created a PR to somewhat change it back.This PR also fixes #1575. I was originally gonna make that its own PR but it turned out I needed to mess with the
updateFluidHeightAndDoFluidPushing
for that as well so I figured it would be fine. I can split it off if desired.