mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 02:45:13 +00:00
Fixed using a Rod of the Unstable Reservoir with a Livingwood Avatar crashing the game if it kills a named mob while CoFHCore's "alert named mob kills" config is enabled. Closes #1617
This commit is contained in:
1 parent
14bf6c90fd
commit
afc846b369
1 file changed
+5
-2
@@ -126,8 +126,11 @@ public class EntityMagicMissile extends EntityThrowable {
|
||||
List<EntityLivingBase> targetList = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(posX - 0.5, posY - 0.5, posZ - 0.5, posX + 0.5, posY + 0.5, posZ + 0.5));
|
||||
if(targetList.contains(target) && target != null) {
|
||||
EntityLivingBase thrower = getThrower();
|
||||
EntityPlayer player = thrower instanceof EntityPlayer ? (EntityPlayer) thrower : null;
|
||||
target.attackEntityFrom(player == null ? DamageSource.causeMobDamage(thrower) : DamageSource.causePlayerDamage(player), evil ? 12 : 7);
|
||||
if(thrower != null) {
|
||||
EntityPlayer player = thrower instanceof EntityPlayer ? (EntityPlayer) thrower : null;
|
||||
target.attackEntityFrom(player == null ? DamageSource.causeMobDamage(thrower) : DamageSource.causePlayerDamage(player), evil ? 12 : 7);
|
||||
} else target.attackEntityFrom(DamageSource.generic, evil ? 12 : 7);
|
||||
|
||||
setDead();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user