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/DoorInfo.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Minecraft.World/DoorInfo.h (limited to 'Minecraft.World/DoorInfo.h') diff --git a/Minecraft.World/DoorInfo.h b/Minecraft.World/DoorInfo.h new file mode 100644 index 00000000..b9382fcd --- /dev/null +++ b/Minecraft.World/DoorInfo.h @@ -0,0 +1,29 @@ +#pragma once + +class DoorInfo +{ +public: + const int x, y, z; + const int insideDx, insideDz; + int timeStamp; + bool removed; + +private: + // this is used for mobs to see how many mobs are + // present, it's not 100% accurate but may be good enough + int bookings; + +public: + DoorInfo(int x, int y, int z, int insideDx, int insideDy, int timeStamp); + + int distanceTo(int x2, int y2, int z2); + int distanceToSqr(int x2, int y2, int z2); + int distanceToInsideSqr(int x2, int y2, int z2); + int getIndoorX(); + int getIndoorY(); + int getIndoorZ(); + bool isInsideSide(int testX, int testZ); + void resetBookingCount(); + void incBookingCount(); + int getBookingsCount(); +}; \ No newline at end of file -- cgit v1.2.3