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

Fix fluid property with no fluid #2222

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Conversation

serenibyss
Copy link
Member

Fixes materials ending up with a FluidProperty, but having no fluids assigned to them. This is most noticeable in this situation:

Material m = Materials.AmmoniumChloride;
m.addProperty(PropertyKey.FLUID, new FluidProperty());

which in 2.7.x and below, was the way to add a fluid to a material. However in 2.8, doing it this way will never create a fluid, causing many issues later on with very unhelpful crash logs.

Let me know if there is a better place to put a fix like this, to ensure no desync between a material having a FluidProperty but no actual fluids

@serenibyss serenibyss requested a review from a team as a code owner November 29, 2023 01:31
@serenibyss serenibyss added the type: bug Something isn't working label Nov 29, 2023
@serenibyss serenibyss merged commit 224e1d2 into master Nov 29, 2023
4 of 5 checks passed
@serenibyss serenibyss deleted the sb-fix-fluid-prop-no-fluid branch November 29, 2023 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants