the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at master 49 lines 1.1 kB view raw
1#pragma once 2using namespace std; 3 4#include "TileEntity.h" 5#include "BaseMobSpawner.h" 6 7class Packet; 8class Entity; 9 10class MobSpawnerTileEntity : public TileEntity 11{ 12public: 13 eINSTANCEOF GetType() { return eTYPE_MOBSPAWNERTILEENTITY; } 14 static TileEntity *create() { return new MobSpawnerTileEntity(); } 15 16private: 17 class TileEntityMobSpawner : public BaseMobSpawner 18 { 19 private: 20 MobSpawnerTileEntity *m_parent; 21 22 public: 23 TileEntityMobSpawner(MobSpawnerTileEntity *parent); 24 25 void broadcastEvent(int id); 26 Level *getLevel(); 27 int getX(); 28 int getY(); 29 int getZ(); 30 void setNextSpawnData(BaseMobSpawner::SpawnData *nextSpawnData); 31 }; 32 33 BaseMobSpawner *spawner; 34 35public: 36 MobSpawnerTileEntity(); 37 ~MobSpawnerTileEntity(); 38 39 virtual void load(CompoundTag *tag); 40 virtual void save(CompoundTag *tag); 41 virtual void tick(); 42 virtual shared_ptr<Packet> getUpdatePacket(); 43 virtual bool triggerEvent(int b0, int b1); 44 virtual BaseMobSpawner *getSpawner(); 45 46 // 4J Added 47 virtual shared_ptr<TileEntity> clone(); 48 void setEntityId(const wstring &id); 49};