Merge pull request #120 from MineMaarten/patch-1
Avoided potential crash when Botania isn't installed.
This commit is contained in:
commit
36a4174c36
|
@ -35,6 +35,7 @@ import cpw.mods.fml.common.ObfuscationReflectionHelper;
|
||||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||||
import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent;
|
import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent;
|
||||||
|
import cpw.mods.fml.common.Optional;
|
||||||
|
|
||||||
public class AlchemicalWizardryEventHooks
|
public class AlchemicalWizardryEventHooks
|
||||||
{
|
{
|
||||||
|
@ -322,7 +323,7 @@ public class AlchemicalWizardryEventHooks
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(projectile instanceof IProjectile) || (projectile instanceof IManaBurst))
|
if (!(projectile instanceof IProjectile) || (AlchemicalWizardry.isBotaniaLoaded && isManaBurst(projectile)))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -474,4 +475,10 @@ public class AlchemicalWizardryEventHooks
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Optional.Method(modid = "Botania")
|
||||||
|
private boolean isManaBurst(Entity projectile)
|
||||||
|
{
|
||||||
|
return projectile instanceof IManaBurst;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue