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

Issue with conditional cmd blocks when changing direction #35

Closed
GnaspGames opened this Issue Jul 23, 2016 · 4 comments

Comments

Projects
None yet
1 participant
@GnaspGames
Owner

GnaspGames commented Jul 23, 2016

An issue has been noticed with how Smelt changes the direction of command blocks. When a command block is conditional, this breaks the conditional logic.

Example: http://i.imgur.com/PjQLZT7.png

Workaround: Users can insert their own blank commands to push the chain of blocks 'around the corner' before the conditional chain is placed. I would prefer it if Smelt could do something to 'fix' this scenario.

There is one known solution that I've tested, which involves inserting generated command blocks when the direction is changed, and the one before the conditional block then uses /blockdata to try and reset the SuccessCount of the previous command. This will fail if the previous command failed (is already 0) and will succeed if the previous command succeeded (it was 1, so we could reset to 0).

Example: http://imgur.com/a/0EqFk

There may be issues with this that need considering. Could this affect other commands or use cases?

It might be possible to also solve this using /stats block but that would require a custom entity and scoreboard objective as well. Which means that the map maker would HAVE to install a module into their world to allow for this type of fix (or the generated code would have to EACH TIME).

I'm going to think about this some more.

@GnaspGames GnaspGames added the bug label Jul 23, 2016

@GnaspGames GnaspGames added this to the Version 1.0.0 milestone Jul 23, 2016

@VexSpectre VexSpectre referenced this issue Jul 29, 2016

Closed

Configurable module layout: Module Size #14

2 of 2 tasks complete
@GnaspGames

This comment has been minimized.

Show comment
Hide comment
@GnaspGames

GnaspGames Aug 3, 2016

Owner

I'm going to be using features from #12 to help fix this; so my focus is on that now.

Owner

GnaspGames commented Aug 3, 2016

I'm going to be using features from #12 to help fix this; so my focus is on that now.

@GnaspGames

This comment has been minimized.

Show comment
Hide comment
@GnaspGames

GnaspGames Aug 9, 2016

Owner

Skaran pointed out that the /testforblock command would be able to do something simular to /blockdata without resetting the SuccessCount.

testforblock ? ? ? minecraft:chain_command_block -1 {SuccessCount:1}

However, the correct command block type would have to be used,

In feature #12 I will hopefully be making it possible to know what the last command block coords and type are. This should make this possible.

Owner

GnaspGames commented Aug 9, 2016

Skaran pointed out that the /testforblock command would be able to do something simular to /blockdata without resetting the SuccessCount.

testforblock ? ? ? minecraft:chain_command_block -1 {SuccessCount:1}

However, the correct command block type would have to be used,

In feature #12 I will hopefully be making it possible to know what the last command block coords and type are. This should make this possible.

GnaspGames added a commit that referenced this issue Aug 16, 2016

@GnaspGames

This comment has been minimized.

Show comment
Hide comment
@GnaspGames

GnaspGames Aug 16, 2016

Owner

Hopefully b876dea will fix this issue. I want to rewrite some code after this; but this will do for now.

Owner

GnaspGames commented Aug 16, 2016

Hopefully b876dea will fix this issue. I want to rewrite some code after this; but this will do for now.

@GnaspGames

This comment has been minimized.

Show comment
Hide comment
@GnaspGames

GnaspGames Aug 16, 2016

Owner

Closed with version 0.9.3

Owner

GnaspGames commented Aug 16, 2016

Closed with version 0.9.3

@GnaspGames GnaspGames closed this Aug 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment