Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash with mobs extending EntityPlayer using XPBoost enchanted weapons #35

Open
olee opened this issue Jun 16, 2015 · 2 comments
Open

Comments

@olee
Copy link

olee commented Jun 16, 2015

There is that mod LittleMaidMobX which adds followers that extend EntityPlayer.
If you give them a weapon with XPBoost entchantment and let them kill a mob, the game will crash with the following ClassCastException. Should be easy to fix by adding an instanceof check.

java.lang.ClassCastException: littleMaidMobX.entity.EntityLittleMaid cannot be cast to net.minecraft.entity.player.EntityPlayer
        at tterrag.core.common.handlers.XPBoostHandler.handleEntityKill(XPBoostHandler.java:53) ~[XPBoostHandler.class:?]
        at cpw.mods.fml.common.eventhandler.ASMEventHandler_650_XPBoostHandler_handleEntityKill_LivingDeathEvent.invoke(.dynamic) ~[?:?]
        at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]
        at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) [EventBus.class:?]
        at net.minecraftforge.common.ForgeHooks.onLivingDeath(ForgeHooks.java:303) [ForgeHooks.class:?]
        at net.minecraft.entity.EntityLivingBase.func_70645_a(EntityLivingBase.java:891) [sv.class:?]
        at net.minecraft.entity.EntityLivingBase.func_70097_a(EntityLivingBase.java:855) [sv.class:?]
        at net.minecraft.entity.monster.EntityMob.func_70097_a(SourceFile:54) [yg.class:?]
        at net.minecraft.entity.monster.EntityZombie.func_70097_a(EntityZombie.java:222) [yq.class:?]
        at net.minecraft.entity.projectile.EntityArrow.func_70071_h_(SourceFile:270) [zc.class:?]
        at net.minecraft.world.World.func_72866_a(World.java:2070) [ahb.class:?]
        at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:648) [mt.class:?]
        at net.minecraft.world.World.func_72870_g(World.java:2034) [ahb.class:?]
        at net.minecraft.world.World.func_72939_s(World.java:1887) [ahb.class:?]
        at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:489) [mt.class:?]
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:636) [MinecraftServer.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:334) [lt.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) [li.class:?]
@tterrag1098
Copy link
Owner

Fixed in above commit

@olee
Copy link
Author

olee commented Jun 24, 2015

Thanks for the fix - don't you want to close this issue then? 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants