Minecraft-Technocracy / Technocracy

Absolutely excessive tech mod for minecraft
GNU Lesser General Public License v2.1
8 stars 7 forks source link

Sync network to client #73

Closed Cydhra closed 3 years ago

Cydhra commented 3 years ago

The client is currently almost completely desynced from conduit network changes. The synchronization does only need to synchronize Parts, as all other logic is only required for routing, which is completely server-side.

Cydhra commented 3 years ago

Implemented synchronization of changes and fixes for rendering code in 1175a1fa64561ad02ed426159a1752fc71aa14a9

Cydhra commented 3 years ago

Modficications on TileEntityPipe are already only handled server-side (as ensured by the respective methods) so no mixup should occur. I will tick off the first todo entry.

Cydhra commented 3 years ago

Something is still off in singleplayer:

java.lang.NullPointerException: Exception in server tick loop
    at net.cydhra.technocracy.foundation.conduits.ConduitNetworkDimension.dijkstra(ConduitNetworkDimension.kt:186)
    at net.cydhra.technocracy.foundation.conduits.ConduitNetworkDimension.tick(ConduitNetworkDimension.kt:109)
    at net.cydhra.technocracy.foundation.conduits.ConduitNetwork.tick(ConduitNetwork.kt:261)
    at net.cydhra.technocracy.foundation.TCFoundation.onTick(TCFoundation.kt:133)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_50_TCFoundation_onTick_WorldTickEvent.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
    at net.minecraftforge.fml.common.FMLCommonHandler.onPreWorldTick(FMLCommonHandler.java:287)
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:752)
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:668)
    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:185)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
    at java.lang.Thread.run(Thread.java:748)

I assume client-model and server-model of the ConduitNetwork are mixed up. It being a static singleton is probably not a good thing

Cydhra commented 3 years ago

The code works and for now, I cannot find any issues with it. Marking this as solved!