diff --git a/src/main/java/travellersgear/common/network/MessageOpenGui.java b/src/main/java/travellersgear/common/network/MessageOpenGui.java index d773888..8bedc9d 100644 --- a/src/main/java/travellersgear/common/network/MessageOpenGui.java +++ b/src/main/java/travellersgear/common/network/MessageOpenGui.java @@ -4,6 +4,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.stats.AchievementList; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; @@ -67,7 +68,8 @@ public IMessage onMessage(MessageOpenGui message, MessageContext ctx) // PacketPipeline.INSTANCE.sendTo(new PacketOpenGui(player,message.guiid), (EntityPlayerMP) player); boolean hasServerGui = TravellersGear.proxy.getServerGuiElement(message.guiid, player, world, (int)player.posX, (int)player.posY, (int)player.posZ)!=null; player.openGui(TravellersGear.instance, message.guiid, player.worldObj, MathHelper.floor_double(player.posX), MathHelper.floor_double(player.posY), MathHelper.floor_double(player.posZ)); + player.addStat(AchievementList.openInventory, 1); return hasServerGui?null: new MessageOpenGui(player,message.guiid); } } -} \ No newline at end of file +}