forgot a null check

This commit is contained in:
AEnterprise 2014-03-13 19:59:27 +01:00
parent 82de1ed0ed
commit dbc0fe42ad
2 changed files with 5 additions and 1 deletions

View file

@ -17,6 +17,7 @@ import buildcraft.core.proxy.CoreProxy;
import buildcraft.core.utils.Utils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ibxm.Player;
import java.util.ArrayList;
@ -109,6 +110,8 @@ public class BlockFiller extends BlockContainer {
}
@Override
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLivingBase entityliving, ItemStack stack){
world.getClosestPlayer(i, j, k, 5).addStat(BuildCraftCore.fasterFillingAchievement, 1);
if (world.getClosestPlayer(i, j, k, 5)!=null){
world.getClosestPlayer(i, j, k, 5).addStat(BuildCraftCore.fasterFillingAchievement, 1);
}
}
}

View file

@ -4,6 +4,7 @@ package buildcraft.core.utils;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.PlayerEvent;
import buildcraft.BuildCraftCore;
import buildcraft.BuildCraftFactory;
public class CraftingHandler {