momentumdevelopment/cosmos

[BUG]AntiHunger

master7720 opened this issue · 2 comments

sometimes crashes you or most of the time it will just kick you from the server and wont let you join back in

---- Minecraft Crash Report ----
// Who set us up the TNT?

Time: 5/7/22 12:28 AM
Description: Unexpected error

java.lang.ClassCastException: net.minecraft.network.play.client.CPacketAnimation cannot be cast to net.minecraft.network.play.client.CPacketEntityAction
at cope.cosmos.client.features.modules.player.AntiHungerModule.onPacketSend(AntiHungerModule.java:77)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_108_AntiHungerModule_onPacketSend_PacketSendEvent.invoke(.dynamic)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
at net.minecraft.network.NetworkManager.handler$onSendPacket$zzj000(NetworkManager.java:1042)
at net.minecraft.network.NetworkManager.func_179290_a(NetworkManager.java)
at net.minecraft.client.network.NetHandlerPlayClient.func_147297_a(NetHandlerPlayClient.java:805)
at net.minecraft.client.entity.EntityPlayerSP.func_184609_a(EntityPlayerSP.java:309)
at net.minecraft.client.Minecraft.func_147116_af(Minecraft.java:1533)
at net.minecraft.client.Minecraft.func_184117_aA(Minecraft.java:2249)
at net.minecraft.client.Minecraft.func_184118_az(Minecraft.java:2020)
at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1808)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1098)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398)
at net.minecraft.client.main.Main.main(SourceFile:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

A detailed walkthrough of the error, its code path and all known details is as follows:

-- Head --
Thread: Client thread
Stacktrace:
at cope.cosmos.client.features.modules.player.AntiHungerModule.onPacketSend(AntiHungerModule.java:77)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_108_AntiHungerModule_onPacketSend_PacketSendEvent.invoke(.dynamic)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
at net.minecraft.network.NetworkManager.handler$onSendPacket$zzj000(NetworkManager.java:1042)
at net.minecraft.network.NetworkManager.func_179290_a(NetworkManager.java)
at net.minecraft.client.network.NetHandlerPlayClient.func_147297_a(NetHandlerPlayClient.java:805)
at net.minecraft.client.entity.EntityPlayerSP.func_184609_a(EntityPlayerSP.java:309)
at net.minecraft.client.Minecraft.func_147116_af(Minecraft.java:1533)
at net.minecraft.client.Minecraft.func_184117_aA(Minecraft.java:2249)
at net.minecraft.client.Minecraft.func_184118_az(Minecraft.java:2020)

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityPlayerSP['_badbug'/106869, l='MpServer', x=88.99, y=77.25, z=2850.66]]
Chunk stats: MultiplayerChunkCache: 49, 49
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options:
Level spawn location: World: (72,64,8), Chunk: (at 8,4,8 in 4,0; contains blocks 64,0,0 to 79,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Level time: 657 game time, 6001 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
Forced entities: 1 total; [EntityPlayerSP['_badbug'/106869, l='MpServer', x=88.99, y=77.25, z=2850.66]]
Retry entities: 0 total; []
Server brand: Waterfall <- Paper
Server type: Non-integrated multiplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.func_72914_a(WorldClient.java:420)
at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2741)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:427)
at net.minecraft.client.main.Main.main(SourceFile:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

ill commit this fix in a second