Fake player crash when typecasting to EntityPlayerMP
LadyCailinBot opened this issue ยท 4 comments
WORLDEDIT-3327 - Reported by kayila
Version: worldedit-forge-mc1.7.10-6.0-beta-01
There is a cross mod compatibility issue where Thaumic Tinkerer has a fakeplayer block which, when the call hits through World Edit's onPlayerInteract method causes it to crash.
Stacktrace:
[20:02:59] [Server thread/ERROR] [FML/]: Exception caught during firing event net.minecraftforge.event.entity.player.PlayerInteractEvent@1a3493ff:
java.lang.ClassCastException: thaumic.tinkerer.common.block.tile.tablet.TabletFakePlayer cannot be cast to net.minecraft.entity.player.EntityPlayerMP
at com.sk89q.worldedit.forge.ForgeWorldEdit.onPlayerInteract(ForgeWorldEdit.java:146) ~[ForgeWorldEdit.class:?]
at cpw.mods.fml.common.eventhandler.ASMEventHandler_726_ForgeWorldEdit_onPlayerInteract_PlayerInteractEvent.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.event.ForgeEventFactory.onPlayerInteract(ForgeEventFactory.java:100) [ForgeEventFactory.class:?]
at thaumic.tinkerer.common.block.tile.tablet.TileAnimationTablet.swingHit(TileAnimationTablet.java:184) [TileAnimationTablet.class:?]
at thaumic.tinkerer.common.block.tile.tablet.TileAnimationTablet.func_145845_h(TileAnimationTablet.java:114) [TileAnimationTablet.class:?]
at net.minecraft.world.World.func_72939_s(World.java:1939) [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:?]
Comment by wizjany
so, thaumcraft extends EntityPlayer instead of Forge's FakePlayer, which extends EntityPlayerMP.
i don't know why, although i guess it's technically correct. wonder if we can change it on our side without breaking everything...
Comment by kayila
Just as a clarification point, the block causing the problem is from Thaumic Tinkerer, which is an addon for Thaumcraft. Not Thaumcraft itself.