Files
MinecraftConsoles/Minecraft.Client/DemoMode.h
void_17 7074f35e4b shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
2026-03-02 15:58:20 +07:00

28 lines
880 B
C++

#pragma once
#include "SurvivalMode.h"
class DemoMode : public SurvivalMode
{
private:
static const int DEMO_DAYS = 5;
bool demoHasEnded;
int demoEndedReminder;
public:
DemoMode(Minecraft *minecraft);
virtual void tick();
private:
void outputDemoReminder();
public:
using GameMode::useItem;
using SurvivalMode::useItemOn;
virtual void startDestroyBlock(int x, int y, int z, int face);
virtual void continueDestroyBlock(int x, int y, int z, int face);
virtual bool destroyBlock(int x, int y, int z, int face);
virtual bool useItem(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item);
virtual bool useItemOn(std::shared_ptr<Player> player, Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z, int face);
virtual void attack(std::shared_ptr<Player> player, std::shared_ptr<Entity> entity);
};