diff options
| author | daoge <3523206925@qq.com> | 2026-03-03 03:04:10 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-03 03:04:10 +0800 |
| commit | b3feddfef372618c8a9d7a0abcaf18cfad866c18 (patch) | |
| tree | 267761c3bb39241ba5c347bfbe2254d06686e287 /Minecraft.World/MobSpawnerTileEntity.h | |
| parent | 84c31a2331f7a0ec85b9d438992e244f60e5020f (diff) | |
feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict
* feat: TU19 (Dec 2014) Features & Content (#32)
* December 2014 files
* Working release build
* Fix compilation issues
* Add sound to Windows64Media
* Add DLC content and force Tutorial DLC
* Revert "Add DLC content and force Tutorial DLC"
This reverts commit 97a43994725008e35fceb984d5549df9c8cea470.
* Disable broken light packing
* Disable breakpoint during DLC texture map load
Allows DLC loading but the DLC textures are still broken
* Fix post build not working
* ...
* fix vs2022 build
* fix cmake build
---------
Co-authored-by: Loki <lokirautio@gmail.com>
Diffstat (limited to 'Minecraft.World/MobSpawnerTileEntity.h')
| -rw-r--r-- | Minecraft.World/MobSpawnerTileEntity.h | 50 |
1 files changed, 20 insertions, 30 deletions
diff --git a/Minecraft.World/MobSpawnerTileEntity.h b/Minecraft.World/MobSpawnerTileEntity.h index 9cfb9f2f..b649702b 100644 --- a/Minecraft.World/MobSpawnerTileEntity.h +++ b/Minecraft.World/MobSpawnerTileEntity.h @@ -2,6 +2,7 @@ using namespace std; #include "TileEntity.h" +#include "BaseMobSpawner.h" class Packet; class Entity; @@ -12,48 +13,37 @@ public: eINSTANCEOF GetType() { return eTYPE_MOBSPAWNERTILEENTITY; } static TileEntity *create() { return new MobSpawnerTileEntity(); } -using TileEntity::setChanged; - private: - static const int MAX_DIST; + class TileEntityMobSpawner : public BaseMobSpawner + { + private: + MobSpawnerTileEntity *m_parent; -public: - int spawnDelay; + public: + TileEntityMobSpawner(MobSpawnerTileEntity *parent); -private: - wstring entityId; - CompoundTag *spawnData; + void broadcastEvent(int id); + Level *getLevel(); + int getX(); + int getY(); + int getZ(); + void setNextSpawnData(BaseMobSpawner::SpawnData *nextSpawnData); + }; - bool m_bEntityIdUpdated; // 4J Added + BaseMobSpawner *spawner; public: - double spin, oSpin; - -private: - int minSpawnDelay; - int maxSpawnDelay; - int spawnCount; - shared_ptr<Entity> displayEntity; - -public: MobSpawnerTileEntity(); + ~MobSpawnerTileEntity(); - wstring getEntityId(); - void setEntityId(const wstring& entityId); - bool isNearPlayer(); - virtual void tick(); - void fillExtraData(shared_ptr<Entity> entity); - -private: - void delay(); - -public: virtual void load(CompoundTag *tag); virtual void save(CompoundTag *tag); - - shared_ptr<Entity> getDisplayEntity(); + virtual void tick(); virtual shared_ptr<Packet> getUpdatePacket(); + virtual bool triggerEvent(int b0, int b1); + virtual BaseMobSpawner *getSpawner(); // 4J Added virtual shared_ptr<TileEntity> clone(); + void setEntityId(const wstring &id); }; |
