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

Singletons (mainly Air#INSTANCE) and constants are incompatible with BlockSpec#maybeWaterlogged #1692

Open
NotStirred opened this issue Feb 29, 2024 · 0 comments

Comments

@NotStirred
Copy link
Member

BlockSpec#maybeWaterlogged modifies the returned object; if that object is a constant any previous or future reference to that object is modified.
For example if a world contains air and air + waterlogged=true then all air blocks in the entire world will be waterlogged.

Any BlockProvider implementation that returns the same object from getBlockByTag for different arguments could run into this issue.

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

No branches or pull requests

1 participant