Go Fish

Go Fish

11M Downloads

[1.19.2] Items disappear due to invalid data

msparkles opened this issue ยท 2 comments

commented
[07:58:56] [Render thread/ERROR]: Error executing task on Client
java.lang.IllegalStateException: Invalid entity data item type for field 12 on entity class_1542['Air'/738, l='ClientLevel', x=-309.27, y=65.47, z=901.69]: old=false(class java.lang.Boolean), new=0(class java.lang.Integer)
	at net.minecraft.class_2945.method_12785(class_2945.java:246) ~[transformed-mod-minecraft.i0:0/:?]
	at net.minecraft.class_2945.method_12779(class_2945.java:231) ~[transformed-mod-minecraft.i0:0/:?]
	at net.minecraft.class_634.method_11093(class_634.java:480) ~[transformed-mod-minecraft.i0:0/:?]
	at net.minecraft.class_2739.method_11808(class_2739.java:39) ~[transformed-mod-minecraft.i0:0/:?]
	at net.minecraft.class_2739.method_11054(class_2739.java:11) ~[transformed-mod-minecraft.i0:0/:?]
	at net.minecraft.class_2600.method_11072(class_2600.java:22) ~[transformed-mod-minecraft.i0:0/:?]
	at net.minecraft.class_1255.method_18859(class_1255.java:157) [transformed-mod-minecraft.i0:0/:?]
	at net.minecraft.class_4093.method_18859(class_4093.java:23) [transformed-mod-minecraft.i0:0/:?]
	at net.minecraft.class_1255.method_16075(class_1255.java:131) [transformed-mod-minecraft.i0:0/:?]
	at net.minecraft.class_1255.method_5383(class_1255.java:116) [transformed-mod-minecraft.i0:0/:?]
	at net.minecraft.class_310.method_1523(class_310.java:1129) [transformed-mod-minecraft.i0:0/:?]
	at net.minecraft.class_310.method_1514(class_310.java:768) [transformed-mod-minecraft.i0:0/:?]
	at net.minecraft.client.main.Main.method_44604(Main.java:244) [transformed-mod-minecraft.i0:0/:?]
	at net.minecraft.client.main.Main.main(Main.java:51) [transformed-mod-minecraft.i0:0/:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at org.quiltmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:527) [quilt-loader-0.18.10.jar:?]
	at org.quiltmc.loader.impl.launch.knot.Knot.launch(Knot.java:82) [quilt-loader-0.18.10.jar:?]
	at org.quiltmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:28) [quilt-loader-0.18.10.jar:?]
	at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:88) [NewLaunch.jar:?]
	at org.prismlauncher.EntryPoint.listen(EntryPoint.java:126) [NewLaunch.jar:?]
	at org.prismlauncher.EntryPoint.main(EntryPoint.java:71) [NewLaunch.jar:?]
commented

Finally found the issue!

Go Fish registers a new TrackedData in vanilla's ItemEntity class via ItemEntityFireproofMixin:

@Unique
private static final TrackedData<Boolean> GF_FIRE_IMMUNE = DataTracker.registerData(ItemEntity.class, TrackedDataHandlerRegistry.BOOLEAN);

Mods should never register new TrackedData to existing entities using mixins, as it can lead to desyncs between the client and server when mod loading order differs between the two environments, as seen here.

Instead, custom packets or something like Cardinal Components API should be used.

commented

If it matters, we're using Quilt.