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/DoorInfo.h | |
| parent | def8cb415354ac390b7e89052a50605285f1aca9 (diff) | |
Initial commit
Diffstat (limited to 'Minecraft.World/DoorInfo.h')
| -rw-r--r-- | Minecraft.World/DoorInfo.h | 29 |
1 files changed, 29 insertions, 0 deletions
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 |
