Should fix fakePlayer lookup NPE #546
I think it's safe to say that if the player is null here, the places we use this check should probably not continue. Will see how it goes. Also added the check to imperfect rituals and removed a redundant check from the dagger.
This commit is contained in:
parent
9aac50542b
commit
5ac78b2dea
3 changed files with 4 additions and 4 deletions
|
@ -4,6 +4,7 @@ import WayofTime.bloodmagic.api.registry.ImperfectRitualRegistry;
|
|||
import WayofTime.bloodmagic.api.ritual.imperfect.IImperfectRitualStone;
|
||||
import WayofTime.bloodmagic.api.ritual.imperfect.ImperfectRitual;
|
||||
import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import lombok.NoArgsConstructor;
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -19,8 +20,7 @@ public class TileImperfectRitualStone extends TileEntity implements IImperfectRi
|
|||
@Override
|
||||
public boolean performRitual(World world, BlockPos pos, ImperfectRitual imperfectRitual, EntityPlayer player)
|
||||
{
|
||||
|
||||
if (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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue