Bug with glass

Post Reply
User avatar
Sergey
Member
Posts: 784
Joined: Wed Jan 11, 2017 13:28
Location: Russia

Bug with glass

by Sergey » Post

Transparent glass will contain opaque area after few simple steps.

1) Place any block that can be twisted with screwdriver. For example, stone brick.

Image

2) Twist that block. I twisted it three times with right mouse button. Block becomes like this.

Image

3) With WorldEdit mod select that block. Let it be pos1 and pos2, so selected region is 1x1x1.

Image

4) Replace stone brick with glass.

Code: Select all

//replace default:stonebrick glass
And glass becomes like this (with red opaque area inside).

Image

And this is how simple glass looks like

Image

==========

I suppose that twisted state of replaced items is remembered and transfered to replacing items. In case of transparent items it results to being not transparent.

User avatar
cheapie
Member
Posts: 316
Joined: Mon May 14, 2012 00:59
GitHub: cheapie
IRC: cheapie
In-game: cheapie

Re: Bug with glass

by cheapie » Post

WorldEdit replaces the node name *only*, and does not touch param2, metadata, etc. when doing //replace. That way, if you replace some rotated nodes with some others that support rotation, they stay rotated. If you want to clear the param2 value for the selected area, you can use this:

//luatransform local node = minetest.get_node(pos);node.param2=0;minetest.set_node(pos,node)

User avatar
Sergey
Member
Posts: 784
Joined: Wed Jan 11, 2017 13:28
Location: Russia

Re: Bug with glass

by Sergey » Post

cheapie wrote:WorldEdit replaces the node name *only*, and does not touch param2, metadata, etc. when doing //replace. That way, if you replace some rotated nodes with some others that support rotation, they stay rotated. If you want to clear the param2 value for the selected area, you can use this:

//luatransform local node = minetest.get_node(pos);node.param2=0;minetest.set_node(pos,node)
It does not fix the bug. It is workaround.
As I understand from what you said, WorldEdit must implement replace method better, taking into account what node to be replaced and what node is replacing. I mean their support of rotation.

User avatar
cheapie
Member
Posts: 316
Joined: Mon May 14, 2012 00:59
GitHub: cheapie
IRC: cheapie
In-game: cheapie

Re: Bug with glass

by cheapie » Post

Sergey wrote:
cheapie wrote:WorldEdit replaces the node name *only*, and does not touch param2, metadata, etc. when doing //replace. That way, if you replace some rotated nodes with some others that support rotation, they stay rotated. If you want to clear the param2 value for the selected area, you can use this:

//luatransform local node = minetest.get_node(pos);node.param2=0;minetest.set_node(pos,node)
It does not fix the bug. It is workaround.
As I understand from what you said, WorldEdit must implement replace method better, taking into account what node to be replaced and what node is replacing. I mean their support of rotation.
So you want it to zero out param2 in some cases but not others? That seems rather inconsistent to me.

User avatar
Sergey
Member
Posts: 784
Joined: Wed Jan 11, 2017 13:28
Location: Russia

Re: Bug with glass

by Sergey » Post

cheapie wrote:So you want it to zero out param2 in some cases but not others? That seems rather inconsistent to me.
So you want glass with glitches? That seems rather inconsistent to me.

User avatar
cheapie
Member
Posts: 316
Joined: Mon May 14, 2012 00:59
GitHub: cheapie
IRC: cheapie
In-game: cheapie

Re: Bug with glass

by cheapie » Post

Sergey wrote:
cheapie wrote:So you want it to zero out param2 in some cases but not others? That seems rather inconsistent to me.
So you want glass with glitches? That seems rather inconsistent to me.
The "glitches" are just a non-zero param2, which is what it had before you replaced it.

User avatar
Sergey
Member
Posts: 784
Joined: Wed Jan 11, 2017 13:28
Location: Russia

Re: Bug with glass

by Sergey » Post

cheapie wrote:
Sergey wrote:
cheapie wrote:So you want it to zero out param2 in some cases but not others? That seems rather inconsistent to me.
So you want glass with glitches? That seems rather inconsistent to me.
The "glitches" are just a non-zero param2, which is what it had before you replaced it.
So? I just can't understand why you protecting some inner variable's value? Don't care how buggy and glitchy game is. Important thing is that we kept value of some inner variable. Bravo!

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Bug with glass

by Krock » Post

It would be a pain to replace stairs using WorldEdit. Checking each node for its definition to decide whether param2 should be cleared or not. For simplyness, request a new command to clear param2 for all nodes in the selected area.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
cheapie
Member
Posts: 316
Joined: Mon May 14, 2012 00:59
GitHub: cheapie
IRC: cheapie
In-game: cheapie

Re: Bug with glass

by cheapie » Post

Krock wrote:It would be a pain to replace stairs using WorldEdit. Checking each node for its definition to decide whether param2 should be cleared or not. For simplyness, request a new command to clear param2 for all nodes in the selected area.
Maybe even better than that would be the ability to specify param and param2 as part of the node name? So, for example, "//s default:glass" would set the name to glass and leave param and param2 untouched, while "//s default:glass,128,0" would set param to 128 and param2 to 0.

User avatar
Sergey
Member
Posts: 784
Joined: Wed Jan 11, 2017 13:28
Location: Russia

Re: Bug with glass

by Sergey » Post

cheapie wrote:
Krock wrote:It would be a pain to replace stairs using WorldEdit. Checking each node for its definition to decide whether param2 should be cleared or not. For simplyness, request a new command to clear param2 for all nodes in the selected area.
Maybe even better than that would be the ability to specify param and param2 as part of the node name? So, for example, "//s default:glass" would set the name to glass and leave param and param2 untouched, while "//s default:glass,128,0" would set param to 128 and param2 to 0.
As ordinary gamer, I don't even understand what you are talking about! Param, param2! What a hell is that! It is a rhetorical question. I don't need answer.
Put yourselves in gamers' place.

User avatar
cheapie
Member
Posts: 316
Joined: Mon May 14, 2012 00:59
GitHub: cheapie
IRC: cheapie
In-game: cheapie

Re: Bug with glass

by cheapie » Post

If you're an "ordinary gamer", then why are you using WorldEdit?

User avatar
Sergey
Member
Posts: 784
Joined: Wed Jan 11, 2017 13:28
Location: Russia

Re: Bug with glass

by Sergey » Post

cheapie wrote:If you're an "ordinary gamer", then why are you using WorldEdit?
To remove water and lava underground. And to eliminate mountains for my house.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Bug with glass

by paramat » Post

Param2 applied to glass causes a certain level of liquid to appear inside, as if it were a tank of liquid, it's intentional.
It's also intentional that WorldEdit does not alter param2 when replacing nodes, so you need to make a request to the authors of WorldEdit for new functionality.
This is not a bug in MT.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests