Swing arm when imperfect ritual activation is successful

This commit is contained in:
Nick 2016-01-30 19:34:26 -08:00
parent d5670b5f0e
commit 5f16ed72f8

View file

@ -20,12 +20,15 @@ public class TileImperfectRitualStone extends TileEntity implements IImperfectRi
@Override
public boolean performRitual(World world, BlockPos pos, ImperfectRitual imperfectRitual, EntityPlayer player)
{
if (!world.isRemote && !PlayerHelper.isFakePlayer(player) && imperfectRitual != null && ImperfectRitualRegistry.ritualEnabled(imperfectRitual))
if (!PlayerHelper.isFakePlayer(player) && imperfectRitual != null && ImperfectRitualRegistry.ritualEnabled(imperfectRitual))
{
NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, imperfectRitual.getActivationCost());
if (imperfectRitual.onActivate(this, player))
if (imperfectRitual.isLightshow())
{
if (imperfectRitual.isLightshow() && !getWorld().isRemote)
getWorld().addWeatherEffect(new EntityLightningBolt(getWorld(), getPos().getX(), getPos().getY() + 2, getPos().getZ()));
return true;
}
}
return false;