Payload "minecraft:brand" isn't registered
arch-fan opened this issue ยท 2 comments
Well, I have the next receiver:
ServerPlayNetworking.registerGlobalReceiver(BrandCustomPayload.ID) { payload, context -> ...And when running, Minecraft server outputs the next error:
Caused by: java.lang.IllegalArgumentException: Cannot register handler as no payload type has been registered with name "minecraft:brand" for SERVERBOUND PLAY
I think "minecraft:brand" should be registered.
Ok, it should be registered like this:
PayloadTypeRegistry.playC2S().register(BrandCustomPayload.ID, BrandCustomPayload.CODEC)But then, when registering a global receiver like this:
ServerPlayNetworking.registerGlobalReceiver(BrandCustomPayload.ID) { payload, context ->callback is never executed. That's a expected behaviour?