Enchanted-Games / block-place-particles

A NeoForge and Fabric mod that adds particles to various interactions in the game, such as placing a block or tilling dirt.
Other
5 stars 0 forks source link

Crash with 'right click to harvest' mods #1

Closed milkev closed 2 months ago

milkev commented 2 months ago

Using Block Place Particles and Actually Harvest kicks you from singleplayer with the message 'Network protocol error' when you right click-harvest a crop. Did not test with other right click to harvest mods but presuming it would be the same result.

relevant crash log is as follows;

[31Aug2024 13:50:26.289] [Render thread/ERROR] [net.minecraft.client.multiplayer.ClientCommonPacketListenerImpl/]: Failed to handle packet net.minecraft.network.protocol.game.ClientboundLevelEventPacket@592b16a8 net.minecraft.ReportedException: Playing level event at TRANSFORMER/minecraft@1.21.1/net.minecraft.client.multiplayer.ClientLevel.levelEvent(ClientLevel.java:691) ~[client-1.21.1-20240808.144430-srg.jar%23515!/:?] at TRANSFORMER/minecraft@1.21.1/net.minecraft.world.level.LevelAccessor.levelEvent(LevelAccessor.java:105) ~[client-1.21.1-20240808.144430-srg.jar%23515!/:?] at TRANSFORMER/minecraft@1.21.1/net.minecraft.client.multiplayer.ClientPacketListener.handleLevelEvent(ClientPacketListener.java:1451) ~[client-1.21.1-20240808.144430-srg.jar%23515!/:?] at TRANSFORMER/minecraft@1.21.1/net.minecraft.network.protocol.game.ClientboundLevelEventPacket.handle(ClientboundLevelEventPacket.java:46) ~[client-1.21.1-20240808.144430-srg.jar%23515!/:?] at TRANSFORMER/minecraft@1.21.1/net.minecraft.network.protocol.game.ClientboundLevelEventPacket.handle(ClientboundLevelEventPacket.java:10) ~[client-1.21.1-20240808.144430-srg.jar%23515!/:?] at TRANSFORMER/minecraft@1.21.1/net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:27) ~[client-1.21.1-20240808.144430-srg.jar%23515!/:?] at TRANSFORMER/minecraft@1.21.1/net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:148) ~[client-1.21.1-20240808.144430-srg.jar%23515!/:?] at TRANSFORMER/minecraft@1.21.1/net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) ~[client-1.21.1-20240808.144430-srg.jar%23515!/:?] at TRANSFORMER/minecraft@1.21.1/net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:122) ~[client-1.21.1-20240808.144430-srg.jar%23515!/:?] at TRANSFORMER/minecraft@1.21.1/net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:111) ~[client-1.21.1-20240808.144430-srg.jar%23515!/:?] at TRANSFORMER/minecraft@1.21.1/net.minecraft.client.Minecraft.runTick(Minecraft.java:1155) ~[client-1.21.1-20240808.144430-srg.jar%23515!/:?] at TRANSFORMER/minecraft@1.21.1/net.minecraft.client.Minecraft.run(Minecraft.java:807) ~[client-1.21.1-20240808.144430-srg.jar%23515!/:?] at TRANSFORMER/minecraft@1.21.1/net.minecraft.client.main.Main.main(Main.java:230) ~[client-1.21.1-20240808.144430-srg.jar%23515!/:?] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?] at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?] at MC-BOOTSTRAP/fml_loader@4.0.24/net.neoforged.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:136) ~[loader-4.0.24.jar%23168!/:4.0] at MC-BOOTSTRAP/fml_loader@4.0.24/net.neoforged.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:124) ~[loader-4.0.24.jar%23168!/:4.0] at MC-BOOTSTRAP/fml_loader@4.0.24/net.neoforged.fml.loading.targets.CommonClientLaunchHandler.runService(CommonClientLaunchHandler.java:32) ~[loader-4.0.24.jar%23168!/:4.0] at MC-BOOTSTRAP/fml_loader@4.0.24/net.neoforged.fml.loading.targets.CommonLaunchHandler.lambda$launchService$4(CommonLaunchHandler.java:118) ~[loader-4.0.24.jar%23168!/:4.0] at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-11.0.4.jar%23163!/:?] at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-11.0.4.jar%23163!/:?] at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-11.0.4.jar%23163!/:?] at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.Launcher.run(Launcher.java:103) [modlauncher-11.0.4.jar%23163!/:?] at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.Launcher.main(Launcher.java:74) [modlauncher-11.0.4.jar%23163!/:?] at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-11.0.4.jar%23163!/:?] at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-11.0.4.jar%23163!/:?] at cpw.mods.bootstraplauncher@2.0.2/cpw.mods.bootstraplauncher.BootstrapLauncher.run(BootstrapLauncher.java:210) [bootstraplauncher-2.0.2.jar:?] at cpw.mods.bootstraplauncher@2.0.2/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:69) [bootstraplauncher-2.0.2.jar:?] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?] at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?] at io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:67) [ForgeWrapper-prism-2024-02-29.jar:prism-2024-02-29] at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:100) [NewLaunch.jar:?] at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129) [NewLaunch.jar:?] at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) [NewLaunch.jar:?] Caused by: java.lang.ClassCastException: class net.minecraft.world.item.AirItem cannot be cast to class net.minecraft.world.item.BlockItem (net.minecraft.world.item.AirItem and net.minecraft.world.item.BlockItem are in module minecraft@1.21.1 of loader 'TRANSFORMER' @19656e21) at TRANSFORMER/eg_particle_interactions@0.1/games.enchanted.blockplaceparticles.particle_spawning.BlockParticleOverride.getOverrideForBlockState(BlockParticleOverride.java:84) ~[eg_particle_interactions-0.1-neoforge-mc1.21.jar%23603!/:?] at TRANSFORMER/minecraft@1.21.1/net.minecraft.client.particle.ParticleEngine.handler$bak000$eg_particle_interactions$useParticleInteractionsDestroyParticleLogic(ParticleEngine.java:2189) ~[client-1.21.1-20240808.144430-srg.jar%23515!/:?] at TRANSFORMER/minecraft@1.21.1/net.minecraft.client.particle.ParticleEngine.destroy(ParticleEngine.java) ~[client-1.21.1-20240808.144430-srg.jar%23515!/:?] at TRANSFORMER/minecraft@1.21.1/net.minecraft.client.multiplayer.ClientLevel.addDestroyBlockEffect(ClientLevel.java:948) ~[client-1.21.1-20240808.144430-srg.jar%23515!/:?] at TRANSFORMER/minecraft@1.21.1/net.minecraft.client.renderer.LevelRenderer.levelEvent(LevelRenderer.java:3073) ~[client-1.21.1-20240808.144430-srg.jar%23515!/:?] at TRANSFORMER/minecraft@1.21.1/net.minecraft.client.multiplayer.ClientLevel.levelEvent(ClientLevel.java:683) ~[client-1.21.1-20240808.144430-srg.jar%23515!/:?] ... 33 more

main error line seems to be; "Caused by: java.lang.ClassCastException: class net.minecraft.world.item.AirItem cannot be cast to class net.minecraft.world.item.BlockItem (net.minecraft.world.item.AirItem and net.minecraft.world.item.BlockItem"

Enchanted-Games commented 2 months ago

should be fixed in v0.1.1

milkev commented 2 months ago

im still getting a similar error with v0.1.1. This time it only seems to happen with double tall blocks such as rice from farmers delight.

Test with EG Particle Interactions v0.1.1, Farmers Delight 1.2.4, YACL 3.5.0, Actually Harvest 1.1.0.4 latest.log

I also tested with Right Click harvest (different mod from actually harvest) this time as well, and it doesnt crash. I can make a sister issue on Actually Harvests github, dunno who's at fault for the error here.

Enchanted-Games commented 2 months ago

It’s most definitely the fault of this mod, I’ll see if I can implement a better fix for it

Enchanted-Games commented 2 months ago

i think ive fixed it properly this time, just going to test a bit more to make sure its actually fixed

Enchanted-Games commented 2 months ago

should be fixed properly in v0.1.2