Open CerealAxis opened 1 month ago
看起来是bundle packet不兼容StreamCodec导致的 可以考虑直接忽略这部分包?
不能忽略 只能单独处理
忽略bundle packet这块包后leaves可以生成摄像头并录制,但由于replaymod暂无1.20.6版本,不知录制出的视频能否正常使用。
private byte @NotNull [] getPacketBytes(Packet packet, ConnectionProtocol state) {
ProtocolInfo<?> protocol = this.protocols.get(state);
if (protocol == null) {
System.err.println("Unknown protocol state " + state);
return new byte[0];
}
ByteBuf buf = Unpooled.buffer();
try {
protocol.codec().encode(buf, packet);
} catch (EncoderException e) {
System.err.println("Error encoding packet: " + packet.getClass().getName());
return new byte[0];
}
buf.readerIndex(0);
byte[] ret = new byte[buf.readableBytes()];
buf.readBytes(ret);
buf.release();
return ret;
}
那我们着急什么,我不想发1.20.6的正式版了其实
好家伙 看这么快的嘛)
直接考虑1.21吧(
这个问题还存在吗?
暂无报错。但是leaves录制出的录像带是否可用需等待ReplayMod更新了1.21才知道。
服务端版本 LeavesMC Version
1.20.6-206-0d3dee8 (MC: 1.20.6)
预期的行为 Expected behavior
当调用ReplayAPI进行录制的时候,服务端无报错。
观测到的实际行为 Observed/Actual behavior
ReplayAPI无法按预期工作。且服务端会报错刷屏。日志如下:
复现步骤 Steps/models to reproduce
插件与数据包列表。 Plugin and Datapack List.
服务端插件
服务端数据包
更多详细信息。 The more information.
Nothing.