pWn3d1337 / Techguns

Techguns mod for minecraft
https://minecraft.curseforge.com/projects/techguns
16 stars 4 forks source link

java.lang.ClassCastException: techguns.entities.npcs.ZombieMiner cannot be cast to net.minecraft.entity.player.EntityPlayerMP #181

Closed Chronic-Reflexes closed 6 years ago

Chronic-Reflexes commented 6 years ago

Caused by: java.lang.ClassCastException: techguns.entities.npcs.ZombieMiner cannot be cast to net.minecraft.entity.player.EntityPlayerMP at techguns.items.armors.GenericArmor.damageArmor(GenericArmor.java:469) ~[GenericArmor.class:?] at org.spongepowered.mod.util.StaticMixinForgeHelper.acceptArmorModifier(StaticMixinForgeHelper.java:126) ~[StaticMixinForgeHelper.class:1.12.2-2705-7.1.0-BETA-3126] at net.minecraft.entity.EntityLivingBase.applyArmorDamage(EntityLivingBase.java:5110) ~[vp.class:?] at net.minecraft.entity.EntityLivingBase.damageEntityHook(EntityLivingBase.java:3691) ~[vp.class:?] at net.minecraft.entity.EntityLivingBase.func_70097_a(EntityLivingBase.java:3506) ~[vp.class:?] at net.minecraft.entity.monster.EntityMob.func_70097_a(EntityMob.java:70) ~[ade.class:?] at net.minecraft.entity.player.EntityPlayer.func_71059_n(EntityPlayer.java:3891) ~[aed.class:?] at net.minecraft.entity.player.EntityPlayerMP.func_71059_n(EntityPlayerMP.java:1420) ~[oq.class:?] at net.minecraft.network.NetHandlerPlayServer.func_147340_a(NetHandlerPlayServer.java:2605) ~[pa.class:?] at net.minecraft.network.play.client.CPacketUseEntity.func_148833_a(SourceFile:69) ~[li.class:?] at net.minecraft.network.play.client.CPacketUseEntity.func_148833_a(SourceFile:13) ~[li.class:?] at org.spongepowered.common.network.PacketUtil.onProcessPacket(PacketUtil.java:148) ~[PacketUtil.class:1.12.2-2705-7.1.0-BETA-3126] at net.minecraft.network.PacketThreadUtil$1.redirect$onProcessPacket$zlb000(SourceFile:539) ~[hv$1.class:?] at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) ~[hv$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_161] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_161] at net.minecraft.util.Util.func_181617_a(SourceFile:46) ~[h.class:?] #

pyscho974 commented 6 years ago

this seems to only be an issue when using spongeforge from what i can tell.. .. also tinkers bows does not like this when using spongeforge.. it 1 shot kills all the techgun mobs and the mobs do not drop loot or xp.. .

https://github.com/SpongePowered/SpongeForge/issues/2204

AceSardonyx commented 11 months ago

this seems to only be an issue when using spongeforge from what i can tell.. .. also tinkers bows does not like this when using spongeforge.. it 1 shot kills all the techgun mobs and the mobs do not drop loot or xp.. .

SpongePowered/SpongeForge#2204

https://github.com/SpongePowered/SpongeForge/issues/2204 Read the latest comment from this issue @pyscho974

AceSardonyx commented 11 months ago

@pWn3d1337

pyscho974 commented 11 months ago

this seems to only be an issue when using spongeforge from what i can tell.. .. also tinkers bows does not like this when using spongeforge.. it 1 shot kills all the techgun mobs and the mobs do not drop loot or xp.. . SpongePowered/SpongeForge#2204

SpongePowered/SpongeForge#2204 Read the latest comment from this issue @pyscho974

i dont understand why bringing this up again? it was fixed with techguns 2 in 2018 @AceSardonyx https://www.curseforge.com/minecraft/mc-mods/techguns/files/2958103

AceSardonyx commented 11 months ago

@pyscho974 It's because I was getting a similar issue but I wasn't sure if I should have opened a new issue for it since this seemed really similar to what I was facing. Here's a log if you have any idea but I'm not good when it comes to this > https://mclo.gs/Az1vUQo#L29 Hopefully you know lol It's making the game unplayable bc it crashes every time. I was told it was an issue with tg, but idk because it ONLY happens when I am not on earth (im using gc, more & extra planets, galaxy space, exo planets, & zollern galaxy which was mentioned in the error a bit I think)

pWn3d1337 commented 11 months ago

Crash happens because "zollerngalaxy" thinks flying gibs (spawned by gore) are Living Entities, which they are not. Maybe you can workaround the crash by disabling gore

AceSardonyx commented 11 months ago

ty I will try that

AceSardonyx commented 11 months ago

@pWn3d1337 That did work so thanks very much. I tried reaching out to them here: https://github.com/alphawolf918/Zollern-Galaxy/issues/97 But they don't seem to want to fix it and are implying it is still an issue with this mod. (I don't think it is?)

pWn3d1337 commented 11 months ago

@pWn3d1337 That did work so thanks very much. I tried reaching out to them here: alphawolf918/Zollern-Galaxy#97 But they don't seem to want to fix it and are implying it is still an issue with this mod. (I don't think it is?)

Clearly a problem that needs to be fixed on the other mods side. Entities do not have to be LivingEntity, The way to fix it is an instanceof check on the other mods side. Not really fixable on Techguns side.

But I can understand mod authors not wanting to fix compatibility with other mods, because there are so many that can happen, so they get defensive. I have done the same.