LeviLamina
Loading...
Searching...
No Matches
ChunkPos.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7class BlockPos;
8class Vec3;
9// clang-format on
10
11class alignas(uint64) ChunkPos : public ll::math::intN2<ChunkPos> {
12public:
13 template <std::floating_point T0, std::floating_point T1>
14 [[nodiscard]] constexpr ChunkPos(T0 x, T1 z)
15 : intN2((static_cast<int>(std::floor(x)) >> 4), (static_cast<int>(std::floor(z)) >> 4)) {}
16
17 using intN2::intN2;
18
19public:
20 // member functions
21 // NOLINTBEGIN
22 MCAPI explicit ChunkPos(::BlockPos const& pos);
23
24 MCAPI explicit ChunkPos(::Vec3 const& pos);
25
26 MCAPI ::BlockPos getMiddleBlockPosition(int y) const;
27
28 MCAPI bool isWithinBounds(::ChunkPos const& min, ::ChunkPos const& max) const;
29
30 MCAPI ::Vec3 toBlockSpaceVec3(float y) const;
31 // NOLINTEND
32
33public:
34 // static variables
35 // NOLINTBEGIN
36 MCAPI static ::ChunkPos const& INVALID();
37
38 MCAPI static ::ChunkPos const& MAX();
39
40 MCAPI static ::ChunkPos const& MIN();
41
42 MCAPI static ::ChunkPos const& ONE();
43 // NOLINTEND
44
45public:
46 // constructor thunks
47 // NOLINTBEGIN
48 MCAPI void* $ctor(::BlockPos const& pos);
49
50 MCAPI void* $ctor(::Vec3 const& pos);
51 // NOLINTEND
52};
Definition BlockPos.h:21
Definition Vec3.h:10