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

dig in sea or water only permits 3 blocks and then stop to dig #6

Open
mckaygerhard opened this issue Feb 17, 2022 · 0 comments
Open

Comments

@mckaygerhard
Copy link

i started a game as normal player, in a water lake try to dig in deep and after dig 2 block the next one cannot be digged, its again replaced and after 4 times i can dig the block..

after futher investigations.. found that the mod its pretty complicted for my skils.. but after changin this line its seems to work:

seems its related to minetest/minetest#4388 (comment)

@@ -73,7 +73,8 @@ if enable_check_range_dig or enable_check_through_block_dig then
                        pos_player = vector.add(pos_player, {x = 0, y = 1.624999, z = 0})
                        local los, pos_los = minetest.line_of_sight(pos_player, pos)
                        local nodetbl = minetest.registered_nodes[minetest.get_node(pos_los).name]
-                       if not vector.equals(pos, pos_los) and nodetbl and nodetbl.drawtype ~= "liquid" and nodetbl.selection_box and nodetbl.selection_box.type == "regular" then
+                       if not vector.equals(pos, pos_los) and nodetbl and nodetbl.drawtype ~= "liquid" and nodetbl.selection_box and nodetbl.selection_box.type == "regular"
+                               and (nodetbl.drawtype == "normal" or nodetbl.walkable ~= false)  then^M
                                return
                        end
                end

also noclip gives me many false positives in 0.4.X but sems in 5.X does work well , it sems the folowing patch gives me better results (i was guessed in code cos its pretty complex)

@@ -172,7 +174,7 @@ if enable_check_noclip then
                if not noclip[name] then
                        noclip[name] = {}
                end
-               local node, node2 = minetest.get_node(pos), minetest.get_node(vector.add(pos, {x = 0, y = 1, z = 0}))
+               local node, node2 = minetest.get_node(pos), minetest.get_node(vector.add(pos, {x = 0, y = 3, z = 0}))
^M
                if not node or not node2 then
                        return
                end

thanks in advance.. i am trying to improve your two mods: fairplay and adblock.. my idea is that adblock must use fairplay exposed api.. (Still not available of xourse) and later the patch for version string

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

No branches or pull requests

1 participant