diff options
| author | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
|---|---|---|
| committer | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
| commit | b691c43c44ff180d10e7d4a9afc83b98551ff586 (patch) | |
| tree | 3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.World/MonsterPlacerItem.h | |
| parent | def8cb415354ac390b7e89052a50605285f1aca9 (diff) | |
Initial commit
Diffstat (limited to 'Minecraft.World/MonsterPlacerItem.h')
| -rw-r--r-- | Minecraft.World/MonsterPlacerItem.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Minecraft.World/MonsterPlacerItem.h b/Minecraft.World/MonsterPlacerItem.h new file mode 100644 index 00000000..f1cead6d --- /dev/null +++ b/Minecraft.World/MonsterPlacerItem.h @@ -0,0 +1,42 @@ +#pragma once + +#include "Item.h" + +class MonsterPlacerItem : public Item +{ +private: + static const int SPAWN_COUNT = 1; + + Icon *overlay; + +public: + + enum _eSpawnResult + { + eSpawnResult_OK=0, + eSpawnResult_FailTooManyPigsCowsSheepCats, + eSpawnResult_FailTooManyChickens, + eSpawnResult_FailTooManySquid, + eSpawnResult_FailTooManyWolves, + eSpawnResult_FailTooManyMooshrooms, + eSpawnResult_FailTooManyAnimals, + eSpawnResult_FailTooManyMonsters, + eSpawnResult_FailTooManyVillagers, + eSpawnResult_FailCantSpawnInPeaceful, + }; + + MonsterPlacerItem(int id); + + virtual wstring getHoverName(shared_ptr<ItemInstance> itemInstance); + virtual int getColor(shared_ptr<ItemInstance> item, int spriteLayer); + virtual bool hasMultipleSpriteLayers(); + virtual Icon *getLayerIcon(int auxValue, int spriteLayer); + virtual bool useOn(shared_ptr<ItemInstance> itemInstance, shared_ptr<Player> player, Level *level, int x, int y, int z, int face, float clickX, float clickY, float clickZ, bool bTestUseOnOnly=false); + static shared_ptr<Entity> spawnMobAt(Level *level, int mobId, double x, double y, double z, int *piResult); // 4J Added piResult param + + // 4J-PB added for dispenser + static shared_ptr<Entity> canSpawn(int iAuxVal, Level *level, int *piResult); + + //@Override + void registerIcons(IconRegister *iconRegister); +};
\ No newline at end of file |
