Fixed a crash when the alfheim portal is clicked with a wand of the forest from a dispenser. Closes #612

This commit is contained in:
Lizbeth Rika committed 2015-02-28 15:34:13 +00:00
1 parent 6705f5c316
commit 9d01ae67c4
1 file changed
+1 -1
@@ -64,7 +64,7 @@ public class BlockAlfPortal extends BlockModContainer implements IWandable, ILex
@Override
public boolean onUsedByWand(EntityPlayer player, ItemStack stack, World world, int x, int y, int z, int side) {
boolean did = ((TileAlfPortal) world.getTileEntity(x, y, z)).onWanded();
if(did)
if(did && player != null)
player.addStat(ModAchievements.elfPortalOpen, 1);
return did;
}