Fixed an error with the achievement handler

This commit is contained in:
Adubbz 2016-01-21 11:26:16 +11:00
parent 9253be0700
commit abe54ad1ca
1 changed files with 4 additions and 0 deletions

View File

@ -264,6 +264,10 @@ public class AchievementEventHandler
//Search every item in the player's main inventory for a biome radar
for (ItemStack stack : player.inventory.mainInventory)
{
//If the stack is null, skip it
if (stack == null)
continue;
if (stack.getItem() == BOPItems.biome_finder && stack.hasTagCompound() && stack.getTagCompound().hasKey("biomeIDToFind"))
{
int biomeIdToFind = stack.getTagCompound().getInteger("biomeIDToFind");