Page 1 of 1

Bug with glass

PostPosted: Thu Mar 16, 2017 19:49
by Sergey
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.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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.

Re: Bug with glass

PostPosted: Sat Mar 25, 2017 08:29
by cheapie
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)

Re: Bug with glass

PostPosted: Sat Mar 25, 2017 11:52
by Sergey
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.

Re: Bug with glass

PostPosted: Sat Mar 25, 2017 20:42
by cheapie
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.

Re: Bug with glass

PostPosted: Sun Mar 26, 2017 00:00
by Sergey
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.

Re: Bug with glass

PostPosted: Sun Mar 26, 2017 03:00
by cheapie
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.

Re: Bug with glass

PostPosted: Sun Mar 26, 2017 03:41
by Sergey
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!

Re: Bug with glass

PostPosted: Sun Mar 26, 2017 09:06
by Krock
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.

Re: Bug with glass

PostPosted: Mon Mar 27, 2017 18:07
by cheapie
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.

Re: Bug with glass

PostPosted: Tue Mar 28, 2017 11:00
by Sergey
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.

Re: Bug with glass

PostPosted: Tue Mar 28, 2017 13:03
by cheapie
If you're an "ordinary gamer", then why are you using WorldEdit?

Re: Bug with glass

PostPosted: Tue Mar 28, 2017 14:37
by Sergey
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.

Re: Bug with glass

PostPosted: Tue Mar 28, 2017 20:51
by paramat
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.