-
Notifications
You must be signed in to change notification settings - Fork 495
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
Add Power Requested trigger #4299
Conversation
Erm, can you revert your cleanup comment and just check to see if the requested is greater than 0 for any of them? (As some things request less than 1 MJ I think?) Although you could probably extract the implementation of (Generally we've found replacing lambdas with normal loops to be quite a decent optimisation) |
The cleanup commit fixes a bug, but I guess I can convert that into a normal loop. |
Oh it did? What was the bug? (As I didn't look very hard, sorry :| ) |
At first, it cycled through the facings one by one and when it found a capability, it took it. Now if the only power consumer was on that side, getPowerRequested() would return 0 since it filters out the requested power of the side you got the capability from. That is not an issue anymore though |
common/buildcraft/transport/statements/TriggerPowerRequested.java
Outdated
Show resolved
Hide resolved
Co-Authored-By: therealfarfetchd <git@marco-rebhan.de>
Oh well obviously I can't merge this yet then :p |
Thanks! |
Trigger turns on when requested power is more than 1 MJ.