ViaFabric

ViaFabric

709k Downloads

1.21.5 clients are kicked when particles are shown while client has fabric api

Kichura opened this issue · 18 comments

commented

/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

  1. Make a fabric 1.21.5 client that has Fabric API and nothing else,
  2. Make a fabric 1.21.6 server with the ViaFabric's preview build and 5.4.0's preview build installed,
  3. Join the server,
  4. Fly up for a bit then fall down.

Expected Behavior

You will not get kicked once particles are played.

Additional Server Info

  1. This server does not use any proxies,
  2. 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,
  3. 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.
commented

I have the same issue.

commented

Its weird cause when getting hit by a sword etc it doesnt trigger but when getting fall damage it does.

commented

Is it fixed?

commented

no

commented

@kennytv Im pretty sure this issue is coming from viabackwards. but the weird thing is its fixed when removing the fabric api.

commented

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

commented

so will there be a fix or a workaround?

commented

Fabric is working on moving their custom data there to custom payloads instead of modifying Vanilla packet data structure

commented

+1
Missing 1.21.6 blockstate for 1.21.7 blockstate -1

commented

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();

			}
		}
	}
}
commented

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?

commented

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)

commented

First, clients below 1.20.2 cannot join the server, and now this 😭

commented

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.

commented

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

commented

Is there any solution? such as remove the client fabric api particles?

commented

After looking at some other posts I found that it should work fine after deleting fabric api however that is obviously not on the table for people with mods requiring fapi