Open Unreal852 opened 2 years ago
I just noticed, if i disconnect and then reconnect to my server the color is the good one, i assume there is a sync issue when creating a portal.
What mc version and cpa are you using? Is your mod installed on both the server and client?
I'm using minecraft 1.19.2 and CPA 0.0.1-beta53-1.19. Yes the mod is installed on both the server and client.
I never officially updated cpa to 1.19.1 or .2, I wonder if that could be causing any issues. I'll investigate later today.
In the meantime, could you link your code somewhere? Just to check it out and rule out any errors that might be there
Sure, here is the project and here is where i create the portal. If you want to try it, start a dedicated server and a client, OP your client and then use /quantum create your_world_name. When thats done just build a bedrock portal and ignite it with a diamond, you should see it black, then disconnect and reconnect your client and you should see it green.
I think I see why. The portal is getting created on the sever when you generate a world with the command. Portals get synced to the client on join. So since the portal is created after the client has already joined, it never syncs.
I'll have to add a way to force sync a portal
Yeah i see the problem, i can write my own sync code for now. If you don't want to always sync portals on creation maybe you can add a .forceSync() in the portal builder class and then when registering the portal if the forceSync was used, you broadcast a packet to all connected clients.
One issue with this is that we need to get an instance of the MinecraftServer. I did add the methods to send the packet in PortalRegistrySync. Just not sure on the best way to call this.
See latest commit for more info
Maybe you can ask for a MinecraftServer instance within the forceSync in the builder but i don't think its a good way of doing it.
wierd issue i have something similar: in my dev enviroment with intellij my portal color is completely fine but in my released version it is broken somehow
There was a sodium incompatibility. This was fixed in beta63
wierd issue i have something similar: in my dev enviroment with intellij my portal color is completely fine but in my released version it is broken somehow
Hi, I'm using CPA with a mod that i made. Everything is working nicely except that the portal is always black no matter which color i use. I create the world and the portal on the server side. Am i doing it wrong or is this a bug?