CB commands, Add conditional commands to chain.#672
CB commands, Add conditional commands to chain.#672firefish5000 wants to merge 2 commits intoPodshot:masterfrom
Conversation
Chains is now under grouping, seperate from sort order. As such, you can specify different sort orders with chains now. All Posible sorts (in case my explanation was unclear): [X,Y,Z], [X,Z,Y], [Y,X,Z], [Y,Z,X], [Z,X,Y], [Z,Y,X] [-X,Y,Z], [-X,Z,Y], [Y,-X,Z], [Y,Z,-X], [Z,-X,Y], [Z,Y,-X] [X,-Y,Z], [X,Z,-Y], [-Y,X,Z], [-Y,Z,X], [Z,X,-Y], [Z,-Y,X] [X,Y,-Z], [X,-Z,Y], [Y,X,-Z], [Y,-Z,X], [-Z,X,Y], [-Z,Y,X] [-X,-Y,Z], [-X,Z,-Y], [-Y,-X,Z], [-Y,Z,-X], [Z,-X,-Y], [Z,-Y,-X] [-X,Y,-Z], [-X,-Z,Y], [Y,-X,-Z], [Y,-Z,-X], [-Z,-X,Y], [-Z,Y,-X] [X,-Y,-Z], [X,-Z,-Y], [-Y,X,-Z], [-Y,-Z,X], [-Z,X,-Y], [-Z,-Y,X] [-X,-Y,-Z], [-X,-Z,-Y], [-Y,-X,-Z], [-Y,-Z,-X], [-Z,-X,-Y], [-Z,-Y,-X]
bfcb74b to
4d704ff
Compare
| chainStored = [] | ||
| for coords in GetSort(self.editor.selectionBox(), sorting): | ||
| (x, y, z) = coords | ||
| if sorting.order == "xyz": |
There was a problem hiding this comment.
I think I may have the order backwards. I was very confused on the sort order when writing this. Should sort XYZ currently does ittertool.product(z,y,x). Meaning we move across X axis first, rather than last.
I am pretty sure this is backwards, but when looking at the CB on the screen it's what I seem to think it means.
|
Second commit separates chain grouping from sorting, and adds a lot more sort options. just XYZ/ZYX wasn't enough for me to easily automate what I was doing. I am not use to python, and am positive that the second commit needs a few changes. |
|
Just let us know when it's ready and I'll merge, some command block stuff was missed simply because I don't think any of us follow command blocks that closely. |
|
Let also think about compatibility between MC versions. I don't know how command blocks are working, but, if someone wants to edit a 1.8 command block, we shall not corrupt the save with 1.9 data. |
|
Wondering if you are still working on this or not? |
|
Sorry, an unplanned family vacation has robed me of my usual programming environment and most of my screens.I'll try to work on it while here, but if I cannot, you can expect something in 8 days for sure. Naturally, ill update my branch if any conflicts arise. I believe I am pretty much done on my side other than updating the config. I am thinking now that I should just translate xz and zx to xyz and zyx (i believe those were original, hard to look it up on this tablet) in the conditionals in select.py and fileedit.py rather than in the config file. Unfortunately, pyparser/pyconfig/whatever it is.... is a bit too difficult for me to wrap my head around at the moment |
I was enjoying generating and pasting commands with the CB Commands chain option, but I had a few chains I had to individually select if I wanted them to be logically sorted.
I am guessing that conditionals separate data values were just missed since they are rather new. But if it was intentional, please note that the rest of the chain gets executed even if the conditional links are not, as such, it is not a good idea to consider a conditional chain block as a new chain.