the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h"
2
3#include "..\..\Minecraft.h"
4#include "..\..\MultiplayerLocalPlayer.h"
5#include "AreaHint.h"
6#include "..\..\..\Minecraft.World\AABB.h"
7#include "Tutorial.h"
8
9AreaHint::AreaHint(eTutorial_Hint id, Tutorial *tutorial, eTutorial_State displayState, eTutorial_State completeState,
10 int descriptionId, double x0, double y0, double z0, double x1, double y1, double z1, bool allowFade /*= false*/, bool contains /*= true*/ )
11 : TutorialHint( id, tutorial, descriptionId, e_Hint_Area, allowFade )
12{
13 area = AABB::newPermanent(x0, y0, z0, x1, y1, z1);
14
15 this->contains = contains;
16
17 m_displayState = displayState;
18 m_completeState = completeState;
19}
20
21AreaHint::~AreaHint()
22{
23 delete area;
24}
25
26int AreaHint::tick()
27{
28 Minecraft *minecraft = Minecraft::GetInstance();
29 if( (m_displayState == e_Tutorial_State_Any || m_tutorial->getCurrentState() == m_displayState) &&
30 m_hintNeeded &&
31 area->contains( minecraft->player->getPos(1) ) == contains )
32 {
33 if( m_completeState == e_Tutorial_State_None )
34 {
35 m_hintNeeded = false;
36 }
37 else if ( m_tutorial->isStateCompleted( m_completeState ) )
38 {
39 m_hintNeeded = false;
40 return -1;
41 }
42
43 return m_descriptionId;
44 }
45 else
46 {
47 return -1;
48 }
49}