LeviLamina
Loading...
Searching...
No Matches
PortalShape.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/legacy/facing/Name.h"
7#include "mc/world/level/BlockPos.h"
8#include "mc/world/level/block/PortalAxis.h"
9
10// auto generated forward declare list
11// clang-format off
12class BlockSource;
13class PortalRecord;
14class Vec3;
16// clang-format on
17
18class PortalShape {
19public:
20 // member variables
21 // NOLINTBEGIN
22 ::ll::TypedStorage<4, 4, ::PortalAxis> mAxis;
23 ::ll::TypedStorage<1, 1, ::Facing::Name> mRightDir;
24 ::ll::TypedStorage<1, 1, ::Facing::Name> mLeftDir;
25 ::ll::TypedStorage<4, 4, int> mNumPortalBlocks;
26 ::ll::TypedStorage<4, 12, ::BlockPos> mBottomLeft;
27 ::ll::TypedStorage<1, 1, bool> mBottomLeftValid;
28 ::ll::TypedStorage<4, 4, int> mHeight;
29 ::ll::TypedStorage<4, 4, int> mWidth;
30 // NOLINTEND
31
32public:
33 // prevent constructor by default
34 PortalShape();
35
36public:
37 // member functions
38 // NOLINTBEGIN
39 MCAPI PortalShape(::BlockSource const& source, ::BlockPos const& pos, ::PortalAxis axis);
40
41 MCAPI int _calculatePortalHeight(::BlockSource const& source);
42
43 MCAPI int _getDistanceUntilEdge(::BlockPos const& pos, ::Facing::Name direction, ::BlockSource const& source) const;
44
45 MCAPI void createPortalBlocks(::WorldChangeTransaction& transaction) const;
46
47 MCAPI ::PortalRecord createRecord() const;
48
49 MCAPI void evaluate(::BlockPos const& originalPosition, ::BlockSource const& source);
50
51 MCFOLD int getNumberOfPortalBlocks() const;
52
53 MCAPI bool isFilled() const;
54
55 MCAPI bool isValid() const;
56
57 MCAPI void removePortalBlocks(::WorldChangeTransaction& transaction, ::BlockPos const& firstPortalPosition) const;
58
59 MCFOLD void setAxis(::PortalAxis axis);
60
61 MCAPI void updateNeighboringBlocks(::BlockSource& source, ::Vec3 const& perpendicularAxis) const;
62 // NOLINTEND
63
64public:
65 // constructor thunks
66 // NOLINTBEGIN
67 MCAPI void* $ctor(::BlockSource const& source, ::BlockPos const& pos, ::PortalAxis axis);
68 // NOLINTEND
69};
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition PortalRecord.h:13
Definition Vec3.h:10
Definition WorldChangeTransaction.h:13