From b3feddfef372618c8a9d7a0abcaf18cfad866c18 Mon Sep 17 00:00:00 2001 From: daoge <3523206925@qq.com> Date: Tue, 3 Mar 2026 03:04:10 +0800 Subject: 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 --- Minecraft.World/MobSpawnerTileEntity.h | 50 ++++++++++++++-------------------- 1 file changed, 20 insertions(+), 30 deletions(-) (limited to 'Minecraft.World/MobSpawnerTileEntity.h') 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 displayEntity; - public: MobSpawnerTileEntity(); + ~MobSpawnerTileEntity(); - wstring getEntityId(); - void setEntityId(const wstring& entityId); - bool isNearPlayer(); - virtual void tick(); - void fillExtraData(shared_ptr entity); - -private: - void delay(); - -public: virtual void load(CompoundTag *tag); virtual void save(CompoundTag *tag); - - shared_ptr getDisplayEntity(); + virtual void tick(); virtual shared_ptr getUpdatePacket(); + virtual bool triggerEvent(int b0, int b1); + virtual BaseMobSpawner *getSpawner(); // 4J Added virtual shared_ptr clone(); + void setEntityId(const wstring &id); }; -- cgit v1.2.3