Skip to content

Send int value from server to player during the loading screen. #1609

Discussion options

You must be logged in to vote

Why are using a static buffer? You are supposed to create one for each request (its not thread safe).

Also, the buffer is likely empty anyway since you don't show anything that would cause the receiver on the server to be called.

        ServerPlayNetworking.registerGlobalReceiver(new Identifier("forging-beyond", "anvil-limit"), (server, playerEntity, handler, buf, responseSender) -> {
System.out.println("Am I reachable?");
            SBUF.writeInt(ContentProvider.getCustomIntLimit());

Why do you have a receiver on the server if the client doesn't send anything?

Replies: 5 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@nikii-me
Comment options

Comment options

You must be logged in to vote
1 reply
@nikii-me
Comment options

Comment options

You must be logged in to vote
1 reply
@nikii-me
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by nikii-me
Comment options

You must be logged in to vote
1 reply
@nikii-me
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants