Overlord

Overlord

875k Downloads

It's better to use try ... catch statement in entity attack.

DBotThePony opened this issue ยท 2 comments

commented
java.lang.ClassCastException: the_fireplace.overlord.entity.EntitySkeletonWarrior cannot be cast to net.minecraft.entity.player.EntityPlayer
	at mekanism.common.item.ItemAtomicDisassembler.func_77644_a(ItemAtomicDisassembler.java:68)
	at the_fireplace.overlord.entity.EntityArmyMember.func_70652_k(EntityArmyMember.java:513)
	at net.minecraft.entity.ai.EntityAIAttackMelee.func_190102_a(EntityAIAttackMelee.java:150)
	at net.minecraft.entity.ai.EntityAIAttackMelee.func_75246_d(EntityAIAttackMelee.java:139)
	at the_fireplace.overlord.entity.EntitySkeletonWarrior$2.func_75246_d(EntitySkeletonWarrior.java:151)
	at net.minecraft.entity.ai.EntityAITasks.func_75774_a(SourceFile:129)
	at net.minecraft.entity.EntityLiving.func_70626_be(EntityLiving.java:773)
	at net.minecraft.entity.EntityLivingBase.func_70636_d(EntityLivingBase.java:2183)
	at net.minecraft.entity.EntityLiving.func_70636_d(EntityLiving.java:577)
	at the_fireplace.overlord.entity.EntityArmyMember.func_70636_d(EntityArmyMember.java:186)
	at the_fireplace.overlord.entity.EntitySkeletonWarrior.func_70636_d(EntitySkeletonWarrior.java:454)
	at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:2013)
	at net.minecraft.entity.EntityLiving.func_70071_h_(EntityLiving.java:295)
	at net.minecraft.world.World.func_72866_a(World.java:1964)
	at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:838)
	at net.minecraft.world.World.func_72870_g(World.java:1934)
	at net.minecraft.world.World.func_72939_s(World.java:1750)
	at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:619)
	at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:709)
	at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:387)
	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:613)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471)
	at java.lang.Thread.run(Unknown Source)

caution: do not give sceletons any weapons that differents from usual swords or bows. in case of rule violation, server crash would happen. you was warned by Captain Obvious
offtopic: Nice mod by the way. it reminds me about GenuineNPC

commented

Not my fault. He is doing a cast without checking first. That's on Mekanism, not me.

commented

See this issue:
mekanism/Mekanism#4120