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
Block networks and Signalling #521
Conversation
…ltiple networks in BlockNetwork class.
…n of Direction objects to reduce memory footprint, as well as performance.
…the topology of its networks. Network is now an interface with read only methods as any changes to Network should be done via BlockNetwork class, which guards consistency of networks topology.
…ed they have different connecting sides. For example logical gates act as both producer and consumer and can end up in the same network.
…hey have different sides.
Tested this already (well, before pressure plates were added!) and it works great :-) Made a video: http://www.youtube.com/watch?v=KZcRc9oCJP8 Leaving PR open for just a bit for any feedback. @immortius ? I know it could use a quick round of checkstyle fixes (ifs) sometime and maybe some commit squashing :-) |
@Override | ||
public void update(float delta) { | ||
// Mark all networks affected by the producer signal change | ||
for (Vector3i producerChanges : producersSignalsChanged) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should avoid bracerless constructs (see the Sun Java style guide).
Given that it is wholly modules (I appreciate this a lot) I don't feel a need to review in great detail. I had a quick glance over it and it looks well done - makes good use of the entity system and event features. Commented on one style matter but it isn't a big deal. |
Great! 👍 Only one thing, had a crash while testing it: 16:52:18.142 [main] INFO o.t.s.componentSystem.SignalSystem - Producer added to network Hope it helps. :) |
Merged! I moved @MrBarsack's bug report to new issue #523 :-) It being this early any sort of rework will probably invalidate that bug but I wanted to keep it around just in case. @MarcinSc - thanks again! I didn't run checkstyle after all since you had asked how to set it up, so if you want to apply some tweaks sometime soon feel free. I didn't want to cause conflicts. If nothing else we'll catch it in a general checkstyle overhaul come the restructuring :-) Idea for next small thing (if you haven't done it already): Outright switch block, which is simply a transformer with two settings - either range 0 or range x. Could just be the existing switches made clickable, really. Could make the texture change too for a "real" switch :-) Sometime big thing challenge: Make an arrow turret out of the combat branch (if you can get it to work ...) that shoots arrows when powered :D |
blockNetwork library mod - support for networks of blocks for conducting power, fluids, signals, etc.
signalling mod - support for sending signals between blocks, based on producer/consumer model