Skip to content

Changed shouldCheckWeakPower to work around bug#1331

Merged
LAGIdiot merged 2 commits intoGregTechCE:masterfrom
solidDoWant:master
Dec 14, 2020
Merged

Changed shouldCheckWeakPower to work around bug#1331
LAGIdiot merged 2 commits intoGregTechCE:masterfrom
solidDoWant:master

Conversation

@solidDoWant
Copy link
Copy Markdown
Contributor

@solidDoWant solidDoWant commented Dec 1, 2020

What:
A vanilla bug prevents getWeakPower from being called. This results in machines and covers being unable to set redstone outputs.

From line 3546 of World::getRedstonePower:
image

As the above image shows, the ternary statement is reversed.

How solved:
I've changed the two implementations of shouldCheckWeakPower to return 'false' instead of 'true', along with an inline explanation of why that's the case.

Outcome:
Fixes: Machines and covers now have the ability to output redstone.

Possible compatibility issue:
No machines or covers currently exist that use this. The change should only affect addons.

@LAGIdiot
Copy link
Copy Markdown
Member

LAGIdiot commented Dec 5, 2020

Thank you for spotting this issue and fixing it.

@LAGIdiot LAGIdiot added status: accepted type: bug Something isn't working labels Dec 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: accepted type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants