From b691c43c44ff180d10e7d4a9afc83b98551ff586 Mon Sep 17 00:00:00 2001 From: daoge_cmd <3523206925@qq.com> Date: Sun, 1 Mar 2026 12:16:08 +0800 Subject: Initial commit --- Minecraft.World/CropTile.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Minecraft.World/CropTile.h (limited to 'Minecraft.World/CropTile.h') diff --git a/Minecraft.World/CropTile.h b/Minecraft.World/CropTile.h new file mode 100644 index 00000000..998c5367 --- /dev/null +++ b/Minecraft.World/CropTile.h @@ -0,0 +1,44 @@ +#pragma once +#include "Bush.h" +#include "Material.h" + +class Random; +class Level; +class ChunkRebuildData; + +class CropTile : public Bush +{ + friend class Tile; + friend class ChunkRebuildData; +private: + Icon **icons; + +protected: + CropTile(int id); + virtual bool mayPlaceOn(int tile); +public: + // 4J Added override + virtual void updateDefaultShape(); + virtual void tick(Level *level, int x, int y, int z, Random *random); + void growCropsToMax(Level *level, int x, int y, int z); +private: + float getGrowthSpeed(Level *level, int x, int y, int z); +public: + virtual Icon *getTexture(int face, int data); + virtual int getRenderShape(); +protected: + virtual int getBaseSeedId(); + virtual int getBasePlantId(); + +public: + /** + * Using this method instead of destroy() to determine if seeds should be + * dropped + */ + virtual void spawnResources(Level *level, int x, int y, int z, int data, float odds, int playerBonus); + virtual int getResource(int data, Random *random, int playerBonusLevel); + virtual int getResourceCount(Random *random); + virtual int cloneTileId(Level *level, int x, int y, int z); + //@Override + virtual void registerIcons(IconRegister *iconRegister); +}; \ No newline at end of file -- cgit v1.2.3