-
Notifications
You must be signed in to change notification settings - Fork 71
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
Pastel Network Rearchitecturing (BE graph -> BlockPos graph) #658
Pastel Network Rearchitecturing (BE graph -> BlockPos graph) #658
Conversation
…s not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not the end is not
…'t-unpiss-the-pastel-network "Fluid" Transfer Pastel Nodes will be real in 2027
It arrived, ty! |
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.
Lots of great improvements all around.
I'll run tests ingame and will look at why some things are the way they are. I am sure you had good reasons.
src/main/java/de/dafuqs/spectrum/blocks/pastel_network/network/ClientPastelNetworkManager.java
Outdated
Show resolved
Hide resolved
src/main/java/de/dafuqs/spectrum/blocks/pastel_network/network/PastelNetwork.java
Outdated
Show resolved
Hide resolved
src/main/java/de/dafuqs/spectrum/blocks/pastel_network/network/ServerPastelNetwork.java
Outdated
Show resolved
Hide resolved
src/main/java/de/dafuqs/spectrum/blocks/pastel_network/network/ServerPastelNetworkManager.java
Outdated
Show resolved
Hide resolved
src/main/java/de/dafuqs/spectrum/blocks/pastel_network/network/ServerPastelNetworkManager.java
Show resolved
Hide resolved
src/main/java/de/dafuqs/spectrum/blocks/pastel_network/nodes/PastelNodeBlockEntity.java
Show resolved
Hide resolved
src/main/java/de/dafuqs/spectrum/blocks/pastel_network/nodes/PastelNodeBlockEntity.java
Outdated
Show resolved
Hide resolved
src/main/java/de/dafuqs/spectrum/networking/SpectrumS2CPacketReceiver.java
Show resolved
Hide resolved
src/main/java/de/dafuqs/spectrum/blocks/pastel_network/nodes/PastelNodeBlockEntity.java
Outdated
Show resolved
Hide resolved
|
Other than the things I found works perfect! |
The unpissing shall be real |
Inspired by your idea to sync network states I changed up the clientside to only ever store the network UUID and its graph. Literally everything else (manipulation of nodes, ticking, connections, ...) are all handled purely serverside now. the client classes are mostly mere holders for rendering now. All changes on the server side that modify the graph are synced to the clientside. No more worries to keep everything in sync manually! Saves >100 loc and headaches. Network traffic has been drastically reduced. |
Oh yeah, the
TODO: |
I took a look through things to make sure things works well, and everything looks great! Nothing popped up past a minor visual desync with upgrades - removing an upgrade will have its visuals remain on the node until rejoining the world. I gave fixing it a short try but decided that you probably have a better idea of how to handle this since upgrades are in a bit of a middle spot when it comes to the server and client. That aside, to unwind from the pastel pissing and also because I have lost control of my life and I just automatically fiddle with rendering whenever I get within 300 feet (omg feet) of client code. I made some minor visual improvements for nodes; the pastel network is a bit more colorful now. |
The node upgrade code is kind of cursed:
|
Go on.
Cry to your mama, eat your crayons.
You can't un-piss the pastel network.
This PR overhauls the internals of the pastel network to fix various issues with it - most notably the extremely problematic server freezes that have been an urgent issue.
To achieve this, a substantial internal overhaul was required. Of note for the major changes are:
_ Common code between Server and Client components of networks has increased.
As a very pleasant side-effect of this overhaul, pastel nodes are now able to transfer items over unloaded chunks as long as the transmitter and receiver are loaded.
Further stress-testing before release would be good. While I am fairly certain everything works as intended, some extra testing is always good.
Footnote: This ordeal has only reinforced my hatred for PersistentState