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

Error message for liquids with liquid_range of 0 #12593

Open
Elkien3 opened this issue Jul 26, 2022 · 7 comments
Open

Error message for liquids with liquid_range of 0 #12593

Elkien3 opened this issue Jul 26, 2022 · 7 comments
Labels
Bug Issues that were confirmed to be a bug Low priority @ Script API

Comments

@Elkien3
Copy link

Elkien3 commented Jul 26, 2022

Minetest version
Minetest 5.5.1 Windows 64 bit Release
OS / Hardware

Operating system: Windows 10
CPU: Intel i7-6700hq

Summary

I made a liquid node that has a liquid_range of 0, and I get error messages in chat when the liquid is supposed to be updated (when it's placed and when nodes near it are changed)
Example Error Message: Map::setNode(): Not allowing to place CONTENT_IGNORE while trying to replace "air" at (78,5,-34) (block (4,0,-3))
It has an error for each air node neighboring it and also itself.
Also I noticed if you add a liquid_alternative_flowing it will place that node around the liquid node, even though the liquid range is supposed to be 0.

Steps to reproduce

add a mod with this code:
minetest.register_node("water_bug:liquid", { description = "Liquid test", tiles = {"default_stone.png"}, paramtype = "light", liquidtype = "source", liquid_range = 0, })
place this node somewhere and you should get the error message.

@Elkien3 Elkien3 added the Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible label Jul 26, 2022
@Wuzzy2
Copy link
Contributor

Wuzzy2 commented Jul 27, 2022

Just add liquid_alternative_flowing = "water_bug:liquid", liquid_alternative_source = "water_bug:liquid"` to the definition and it should work.

@Elkien3
Copy link
Author

Elkien3 commented Jul 27, 2022

That does stop the error message, thanks for the tip!

@appgurueu
Copy link
Contributor

Not a bug, just a poor & spammy error message that should be raised at load time when the invalid liquid def is made.

@sfan5
Copy link
Member

sfan5 commented Jul 28, 2022

Sounds like a definite bug to me, if liquid range is zero then the liquid should never try to flow anywhere and hence not need any flowing/source node defined.
Very low priority though, it's already possible to get liquid appearance without its physics (drawtype = "liquid", liquidtype = "none").

@Elkien3
Copy link
Author

Elkien3 commented Jul 29, 2022

My reason for a node like this is to get the liquid_pointable effect

@Zughy Zughy added Bug Issues that were confirmed to be a bug and removed Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible labels Aug 1, 2022
@sfence
Copy link
Contributor

sfence commented Jan 25, 2024

@sfan5 liquid_alternative_flowing and liquid_alternative_source fields is used to detect some liquid in content_mapblock.cpp.
So is a better way to fix this to add some check to the register_item function, to cause an error if some of these fields are missing, or to change the way, how method sameLiquidRender works?

@appgurueu
Copy link
Contributor

My reason for a node like this is to get the liquid_pointable effect

There now is a "pointability" API (introduced in #13992). If you have control over the tool, that should be sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that were confirmed to be a bug Low priority @ Script API
Projects
None yet
Development

No branches or pull requests

6 participants