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/TopSnowTile.h | 66 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Minecraft.World/TopSnowTile.h (limited to 'Minecraft.World/TopSnowTile.h') diff --git a/Minecraft.World/TopSnowTile.h b/Minecraft.World/TopSnowTile.h new file mode 100644 index 00000000..059f0f42 --- /dev/null +++ b/Minecraft.World/TopSnowTile.h @@ -0,0 +1,66 @@ +#pragma once + +#include "Tile.h" + +class Player; + +class TopSnowTile : public Tile +{ + friend class Tile; +public: + static const int MAX_HEIGHT; + static const int HEIGHT_MASK; + +protected: + TopSnowTile(int id); + +public: + void registerIcons(IconRegister *iconRegister); + AABB *getAABB(Level *level, int x, int y, int z); + +public: + static float getHeight(Level *level, int x, int y, int z); + +public: + bool blocksLight(); + +public: + bool isSolidRender(bool isServerLevel = false); + +public: + bool isCubeShaped(); + +public: + void updateDefaultShape(); + void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, shared_ptr forceEntity = shared_ptr()); // 4J added forceData, forceEntity param + +protected: + void updateShape(int data); + +public: + bool mayPlace(Level *level, int x, int y, int z); + +public: + void neighborChanged(Level *level, int x, int y, int z, int type); + +private: + bool checkCanSurvive(Level *level, int x, int y, int z); + +public: + void playerDestroy(Level *level, shared_ptr player, int x, int y, int z, int data); + +public: + int getResource(int data, Random *random, int playerBonusLevel); + +public: + int getResourceCount(Random *random); + +public: + void tick(Level *level, int x, int y, int z, Random *random); + +public: + bool shouldRenderFace(LevelSource *level, int x, int y, int z, int face); + + // 4J Added so we can check before we try to add a tile to the tick list if it's actually going to do seomthing + virtual bool shouldTileTick(Level *level, int x,int y,int z); +}; -- cgit v1.2.3