
1.21.5 clients are kicked when particles are shown while client has fabric api
Kichura opened this issue · 18 comments
/viaversion dump
Output
https://dump.viaversion.com/6980edf5de81ac95c8a7866d3cc137b9c65ebf219962d35dc70a675dc24b6ab5
Console Error
Missing 1.21.5 blockstate for 1.21.6 blockstate -1
Bug Description
When joining a 1.21.6 server while the 1.21.5 client has Fabric API installed, the client will get kicked when landing onto the ground. (for example)
Steps to Reproduce
- Make a fabric 1.21.5 client that has Fabric API and nothing else,
- Make a fabric 1.21.6 server with the ViaFabric's preview build and 5.4.0's preview build installed,
- Join the server,
- Fly up for a bit then fall down.
Expected Behavior
You will not get kicked once particles are played.
Additional Server Info
- This server does not use any proxies,
- The client is fabric 1.21.5 wth Fabric API 0.127.1+1.21.5 - Meanwhile the server has Fabric API 0.127.1+1.21.6 with ViaFabric's preview build and ViaBackwards+ViaVersion 5.4.0-SNAPSHOT preview,
- No, The client does not use viafabric.
Checklist
- I have checked if this is specific to ViaFabric platform, and doesn't happen when running it on other platforms (Paper/Sponge/Velocity/Waterfall).
- I have included a ViaVersion dump.
- If applicable, I have included a paste (not a screenshot) of the error.
- I have tried the latest build(s) from https://ci.viaversion.com/ and the issue still persists.
Its weird cause when getting hit by a sword etc it doesnt trigger but when getting fall damage it does.
@kennytv Im pretty sure this issue is coming from viabackwards. but the weird thing is its fixed when removing the fabric api.
this also happened on 1.21.7 server with 1.21.5 java client with the following error: Missing 1.21.6 blockstate for 1.21.7 blockstate -1
Fabric API, even without other mods, will change protocol to be Vanilla-incompatible if it detects the client mod https://github.com/FabricMC/fabric/blob/de8b3290191d806c7dacc1970e763d863a3888c9/fabric-particles-v1/src/main/java/net/fabricmc/fabric/impl/particle/ExtendedBlockStateParticleEffectPacketCodec.java#L24
Fabric is working on moving their custom data there to custom payloads instead of modifying Vanilla packet data structure
I haven't been able to recreate this, I wonder if it doesn't happen with the latest Fabric loader & Fabric API?
I have seen it happen to players on my server.
Temporary workaround could be something like this
@Mixin(ServerCommonNetworkHandler.class)
public abstract class StopParticles {
@Inject(method = "send", at = @At("HEAD"), cancellable = true)
public void interceptParticlePackets(Packet<?> packet, ChannelFutureListener channelFutureListener, CallbackInfo ci) {
if (packet instanceof ParticleS2CPacket) {
if ((Object) this instanceof ServerPlayNetworkHandler playHandler) {
ViaAPI<?> viaAPI = Via.getAPI();
int playerVersion = viaAPI.getPlayerVersion(playHandler.getPlayer().getUuid());
int serverVersion = viaAPI.getServerVersion().highestSupportedProtocolVersion().getVersion();
if (playerVersion < serverVersion)
ci.cancel();
}
}
}
}
I haven't been able to recreate this, I wonder if it doesn't happen with the latest Fabric loader & Fabric API? I have seen it happen to players on my server.
@TreeOfSelf it happened to me with the latest fabric and fabric api (fabric 1.21.5-0.16.14 and fabric api 0.128.1+1.21.5). What are your fabric and fabric api versions?
I haven't been able to recreate this, I wonder if it doesn't happen with the latest Fabric loader & Fabric API? I have seen it happen to players on my server.
@TreeOfSelf it happenned on me with latest fabric and fabric api (fabric 1.21.5-0.16.4, and fabric api 0.128.1+1.21.5). What is your fabric and fabric api version?
Tried it with latest fabric-api, loader, on 1.21.6, didn't have it happen to me.
Tried it on 1.21.5, fabric loader 0.16.14, fabric-api-0.128.1+1.21.5, didn't happen either.
(Server is running 1.21.7)
Fabric is working on moving their custom data there to custom payloads instead of modifying Vanilla packet data structure
and now there is a contributor on fabric api who disagrees with your statement.
Have this same issue. Weirdest issue ever.
Client disconnected with reason: Internal Exception: io.netty.handler.codec.DecoderException: java.io.IOException: Packet play/clientbound/minecraft:level_particles (class_2675) was larger than I expected, found 9 bytes extra whilst reading packet clientbound/minecraft:level_particles