Skip to content
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] Update wasTouchingWater flag again #1586

Open
wants to merge 4 commits into
base: 1.21.x
Choose a base branch
from

Conversation

GizmoTheMoonPig
Copy link
Contributor

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 the wasTouchingWater 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.

I am very aware this is a breaking change, however I didn't know a good way of doing this without it being breaking. I'm happy to wait until 1.21.2 to get this merged, I would just like to let isInWater actually work with my water fluid without mixins. I also wanted to take the least intrusive patch route and figured this was the best way since it was already patched territory.

If using the vanilla tag is a bad idea for this, please let me know and I can change it to be the neo tag or even a custom one. Also feel free to let me know if there's better ways to approach this and I can look into them. Thanks for listening!

@neoforged-pr-publishing
Copy link

  • Publish PR to GitHub Packages

@neoforged-compatibility-checks
Copy link

neoforged-compatibility-checks bot commented Oct 10, 2024

@GizmoTheMoonPig, this PR introduces breaking changes.
Fortunately, this project is currently accepting breaking changes, but if they are not intentional, please revert them.
Last checked commit: 0a9c0a0516e27c07b87e81a68cca1b2ad2fc4563.

neoforge (:neoforge)

  • net/minecraft/world/entity/Entity
    • updateFluidHeightAndDoFluidPushing()V: ❗ API method was removed

@GizmoTheMoonPig
Copy link
Contributor Author

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 updateFluidHeightAndDoFluidPushing method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant