LeviLamina
Loading...
Searching...
No Matches
TrapDoorBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/block/BlockSupportType.h"
7#include "mc/world/level/block/BlockType.h"
8
9// auto generated forward declare list
10// clang-format off
11class AABB;
12class Actor;
13class BaseGameVersion;
14class Block;
15class BlockActor;
16class BlockPos;
17class BlockSource;
18class Experiments;
20class ItemInstance;
21class Material;
22class Vec3;
23namespace BlockEvents { class BlockPlaceEvent; }
24namespace BlockEvents { class BlockPlayerInteractEvent; }
25// clang-format on
26
27class TrapDoorBlock : public ::BlockType {
28public:
29 // prevent constructor by default
30 TrapDoorBlock();
31
32public:
33 // virtual functions
34 // NOLINTBEGIN
35 virtual ::AABB const& getVisualShape(::Block const& block, ::AABB& bufferAABB) const /*override*/;
36
37 virtual ::AABB const&
38 getOutline(::Block const& block, ::IConstBlockSource const&, ::BlockPos const& pos, ::AABB& bufferValue) const
39 /*override*/;
40
41 virtual bool canProvideSupport(::Block const& block, uchar face, ::BlockSupportType) const /*override*/;
42
43 virtual ::Block const&
44 getPlacementBlock(::Actor const& by, ::BlockPos const& pos, uchar face, ::Vec3 const& clickPos, int itemValue) const
45 /*override*/;
46
47 virtual void setupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
48
49 virtual void onRedstoneUpdate(::BlockSource& region, ::BlockPos const& pos, int strength, bool isFirstTime) const
50 /*override*/;
51
52 virtual ::ItemInstance asItemInstance(::Block const& block, ::BlockActor const*) const /*override*/;
53
54 virtual bool checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const
55 /*override*/;
56
57 virtual bool isInteractiveBlock() const /*override*/;
58
59 virtual bool breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const /*override*/;
60
61 virtual void _addHardCodedBlockComponents(::Experiments const&) /*override*/;
62
63 virtual void _useTrapDoor(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
64
65 virtual void _onHitByActivatingAttack(::BlockSource& region, ::BlockPos const& pos, ::Actor*) const /*override*/;
66
67 virtual ~TrapDoorBlock() /*override*/;
68 // NOLINTEND
69
70public:
71 // member functions
72 // NOLINTBEGIN
73 MCAPI TrapDoorBlock(::std::string const& nameId, int id, ::Material const& material);
74
75 MCAPI void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
76
77 MCAPI void toggleOpen(::BlockSource& region, ::Actor* user, ::BlockPos const& pos) const;
78
79 MCFOLD void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
80 // NOLINTEND
81
82public:
83 // static functions
84 // NOLINTBEGIN
85 MCAPI static ::AABB const& _getShape(::Block const& block, ::AABB& bufferAABB, bool addBufferSpacing);
86 // NOLINTEND
87
88public:
89 // static variables
90 // NOLINTBEGIN
91 MCAPI static ::BaseGameVersion const& TRAP_DOOR_DOESNT_BREAK_FALLING_BLOCK_VERSION();
92 // NOLINTEND
93
94public:
95 // constructor thunks
96 // NOLINTBEGIN
97 MCAPI void* $ctor(::std::string const& nameId, int id, ::Material const& material);
98 // NOLINTEND
99
100public:
101 // destructor thunk
102 // NOLINTBEGIN
103 MCFOLD void $dtor();
104 // NOLINTEND
105
106public:
107 // virtual function thunks
108 // NOLINTBEGIN
109 MCAPI ::AABB const& $getVisualShape(::Block const& block, ::AABB& bufferAABB) const;
110
111 MCAPI ::AABB const&
112 $getOutline(::Block const& block, ::IConstBlockSource const&, ::BlockPos const& pos, ::AABB& bufferValue) const;
113
114 MCAPI bool $canProvideSupport(::Block const& block, uchar face, ::BlockSupportType) const;
115
116 MCAPI ::Block const& $getPlacementBlock(
117 ::Actor const& by,
118 ::BlockPos const& pos,
119 uchar face,
120 ::Vec3 const& clickPos,
121 int itemValue
122 ) const;
123
124 MCAPI void $setupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos) const;
125
126 MCAPI void $onRedstoneUpdate(::BlockSource& region, ::BlockPos const& pos, int strength, bool isFirstTime) const;
127
128 MCFOLD ::ItemInstance $asItemInstance(::Block const& block, ::BlockActor const*) const;
129
130 MCAPI bool $checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const;
131
132 MCFOLD bool $isInteractiveBlock() const;
133
134 MCAPI bool $breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const;
135
136 MCAPI void $_addHardCodedBlockComponents(::Experiments const&);
137
138 MCAPI void $_useTrapDoor(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
139
140 MCAPI void $_onHitByActivatingAttack(::BlockSource& region, ::BlockPos const& pos, ::Actor*) const;
141
142
143 // NOLINTEND
144
145public:
146 // vftables
147 // NOLINTBEGIN
148 MCNAPI static void** $vftable();
149 // NOLINTEND
150};
Definition AABB.h:18
Definition Actor.h:105
Definition BaseGameVersion.h:8
Definition BlockActor.h:32
Definition BlockPlaceEvent.h:16
Definition BlockPlayerInteractEvent.h:17
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition Block.h:43
Definition Experiments.h:14
Definition IConstBlockSource.h:25
Definition ItemInstance.h:15
Definition Material.h:8
static MCAPI void ** $vftable()
Definition Vec3.h:10