2024-03-06 09:16:23 +01:00
|
|
|
package com.moulberry.axiom;
|
|
|
|
|
2024-03-06 09:21:27 +01:00
|
|
|
import io.netty.buffer.Unpooled;
|
|
|
|
import net.minecraft.network.FriendlyByteBuf;
|
|
|
|
import net.minecraft.network.protocol.game.ClientboundCustomPayloadPacket;
|
2024-03-06 09:16:23 +01:00
|
|
|
import net.minecraft.resources.ResourceLocation;
|
|
|
|
import net.minecraft.server.level.ServerPlayer;
|
|
|
|
|
|
|
|
public class VersionHelper {
|
|
|
|
|
|
|
|
public static void sendCustomPayload(ServerPlayer serverPlayer, ResourceLocation id, byte[] data) {
|
2024-03-06 09:21:27 +01:00
|
|
|
serverPlayer.connection.send(new ClientboundCustomPayloadPacket(id, new FriendlyByteBuf(Unpooled.wrappedBuffer(data))));
|
2024-03-06 09:16:23 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|