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

Infinite nodes obtainable from 2 slabs #786

Closed
ghost opened this issue Jan 15, 2016 · 4 comments
Closed

Infinite nodes obtainable from 2 slabs #786

ghost opened this issue Jan 15, 2016 · 4 comments
Labels

Comments

@ghost
Copy link

ghost commented Jan 15, 2016

Using only two slabs, one can create indefinitely tall towers, gaining free materials. Place one slab and stand on its corner, hold sneak and jump, and hold down RMB.

Edit: Dragonop found this.

@ghost
Copy link
Author

ghost commented Jan 15, 2016

https://youtu.be/2DqGTBYZHpE

Here is a video demonstrating this bug using freshly cloned minetest and minetest_game. You don't have to do this in a tower, you can place your infinite slabs anywhere you like.

@Dragonop
Copy link

You only need to do the tower until the stack runs out, in this case, 2 slabs, then you are free to roam and place infinite slabs, you can use a tool to mine it, release the mouse button, etc.
I think it's not needed to hold sneak jump as long as you use the stack you have (this is why it is done with only 2 slabs, it's faster) and keep holding the mouse button until you start to place slabs even if you don't have any.
Apparently the effect stops after some minutes if you don't use it or if you place another block. You can only place the slabs with your hand.

@kahrl
Copy link
Contributor

kahrl commented Jan 15, 2016

Preliminary diagnosis: The slabs' on_place callback is sometimes returning nil intending to clear the held stack of slabs, however the engine interprets a nil return value as "do not modify the held itemstack".

https://github.com/minetest/minetest/blob/da686160c33069b77a7b4c31fd97da5fa5b59baa/src/script/cpp_api/s_item.cpp#L75

So instead of reducing the slab count to zero, it keeps it at one. Only on the server side though - the client thinks the stack of slabs is gone and you are wielding merely your hand.

@ghost
Copy link
Author

ghost commented Jan 15, 2016

Seems to work just fine. One extra slab is okay compared. Thanks for the quick fix!

BlockMen pushed a commit to blockplanet/blockplanet that referenced this issue Jan 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants