Unable to use query() queryAbs() or queryRel() functions in new WorldEdit
LadyCailinBot opened this issue ยท 3 comments
WORLDEDIT-4010 - Reported by AntOfThy.1
Before the update changes needed by minecraft version 1.13 I was using the //generation command with various query() functions for many different and complex tasks.
For example see my YouTube Video.... Ants 028 World Edit Transforms
However these functions require the use of 'type' and 'data' values, and this no longer seems to work.
Example... select a small region (2x2 or 3x3 region will be fine)
fill it with brown_stained_glass //set brown_stained_glass
Outside that region //outset 1
THIS WORKS...
Now try to replace any non-air block white_stained_glass
//g white_stained_glass !query(x,y,z,0,0)
undo it //undo
Repeat looking for air blocks
//g white_stained_glass query(x,y,z,0,0)
No problems so far...
Undo again //undo
Now trying to match brown_stained_glass (which was type=95 data=12)
//g white_stained_glass query(x,y,z,95,12)
This does NOT match any block!
How can I query and match against a specific block?
Also //g does not recognize queryRel() function though it is listed in functions
Comment by wizjany
for clarity, the only thing not working is matching data values in expressions, as legacy data isn't implemented. so //g <type> query(x,y,z,95,0)
matches all stained glass, but //g <type> query(x,y,z,95,<data>)
matches nothing
queryRel works just fine in //g otherwise, so not sure what the last bit is about. likely a syntax error.
Comment by AntOfThy
That is the problem. The only solution I can see at this time is to place the block you are testing against nearby somewhere and query it to get the values to test for.
EG: place a browsn stained glass block at 111 222 333 then do
//g white_stained_glass bt=bd=0; queryAbs(111,222,333,bt,bd); query(x,y,z,bt,bd)
But this seems very awkward (and I have not actually tested it), though I have done something similar in the video I mentioned where I transform one build into another using a transformation 'pallete' of blocks.
Perhaps we need a function to get the type and data values of a 'named block'.
//g white_stained_glass bt=bd=0; getTypeData("brown_stained_glass",bt,bd); query(x,y,z,bt,bd)