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

CB commands, Add conditional commands to chain. #672

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

firefish5000
Copy link

@firefish5000 firefish5000 commented May 20, 2016

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.

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]
@firefish5000 firefish5000 force-pushed the CB_Commands-add-conditional-chains branch from bfcb74b to 4d704ff Compare May 21, 2016 10:50
skip = []
done = []
chainStored = []
for coords in GetSort(self.editor.selectionBox(), sorting):
(x, y, z) = coords
if sorting.order == "xyz":
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@firefish5000
Copy link
Author

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.

@Khroki
Copy link
Collaborator

Khroki commented May 21, 2016

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.

@LaChal
Copy link
Collaborator

LaChal commented May 21, 2016

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.

@Khroki
Copy link
Collaborator

Khroki commented Jun 13, 2016

Wondering if you are still working on this or not?

@firefish5000
Copy link
Author

firefish5000 commented Jun 14, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants