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; }
25namespace BlockEvents { class BlockRedstoneUpdateEvent; }
26// clang-format on
27
28class TrapDoorBlock : public ::BlockType {
29public:
30 // prevent constructor by default
31 TrapDoorBlock();
32
33public:
34 // virtual functions
35 // NOLINTBEGIN
36 virtual ::AABB const& getVisualShape(::Block const& block, ::AABB& bufferAABB) const /*override*/;
37
38 virtual ::AABB const&
39 getOutline(::Block const& block, ::IConstBlockSource const& pos, ::BlockPos const& bufferValue, ::AABB&) const
40 /*override*/;
41
42 virtual bool canProvideSupport(::Block const& block, uchar face, ::BlockSupportType) const /*override*/;
43
44 virtual ::Block const&
45 getPlacementBlock(::Actor const& by, ::BlockPos const& pos, uchar face, ::Vec3 const& clickPos, int itemValue) const
46 /*override*/;
47
48 virtual ::ItemInstance asItemInstance(::Block const& block, ::BlockActor const*) const /*override*/;
49
50 virtual bool checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const
51 /*override*/;
52
53 virtual bool isInteractiveBlock() const /*override*/;
54
55 virtual bool breaksFallingBlocks(::Block const& version, ::BaseGameVersion const) const /*override*/;
56
57 virtual void _addHardCodedBlockComponents(::Experiments const& experiments) /*override*/;
58
59 virtual void _useTrapDoor(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
60
61 virtual void _onHitByActivatingAttack(::BlockSource& region, ::BlockPos const& pos, ::Actor*) const /*override*/;
62 // NOLINTEND
63
64public:
65 // member functions
66 // NOLINTBEGIN
67 MCAPI TrapDoorBlock(::std::string const& nameId, int id, ::Material const& material);
68
69 MCAPI void _onRedstoneUpdate(::BlockEvents::BlockRedstoneUpdateEvent& blockEvent) const;
70
71 MCAPI void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
72
73 MCAPI void setOpen(::BlockSource& region, ::BlockPos const& pos, bool shouldOpen) const;
74
75 MCAPI void toggleOpen(::BlockSource& region, ::Actor* user, ::BlockPos const& pos) const;
76
77 MCFOLD void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
78 // NOLINTEND
79
80public:
81 // static functions
82 // NOLINTBEGIN
83 MCAPI static ::AABB const& _getShape(::Block const& block, ::AABB& bufferAABB, bool addBufferSpacing);
84
85 MCAPI static void _onSetupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos);
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 // virtual function thunks
102 // NOLINTBEGIN
103 MCAPI ::AABB const& $getVisualShape(::Block const& block, ::AABB& bufferAABB) const;
104
105 MCAPI ::AABB const&
106 $getOutline(::Block const& block, ::IConstBlockSource const& pos, ::BlockPos const& bufferValue, ::AABB&) const;
107
108 MCAPI bool $canProvideSupport(::Block const& block, uchar face, ::BlockSupportType) const;
109
110 MCAPI ::Block const& $getPlacementBlock(
111 ::Actor const& by,
112 ::BlockPos const& pos,
113 uchar face,
114 ::Vec3 const& clickPos,
115 int itemValue
116 ) const;
117
118 MCFOLD ::ItemInstance $asItemInstance(::Block const& block, ::BlockActor const*) const;
119
120 MCAPI bool $checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const;
121
122 MCFOLD bool $isInteractiveBlock() const;
123
124 MCAPI bool $breaksFallingBlocks(::Block const& version, ::BaseGameVersion const) const;
125
126 MCAPI void $_addHardCodedBlockComponents(::Experiments const& experiments);
127
128 MCAPI void $_useTrapDoor(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
129
130 MCAPI void $_onHitByActivatingAttack(::BlockSource& region, ::BlockPos const& pos, ::Actor*) const;
131
132
133 // NOLINTEND
134
135public:
136 // vftables
137 // NOLINTBEGIN
138 MCAPI static void** $vftable();
139 // NOLINTEND
140};
Definition AABB.h:18
Definition Actor.h:125
Definition BaseGameVersion.h:13
Definition BlockActor.h:30
Definition BlockPlaceEvent.h:18
Definition BlockPlayerInteractEvent.h:20
Definition BlockRedstoneUpdateEvent.h:16
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition Block.h:69
Definition Experiments.h:14
Definition IConstBlockSource.h:24
Definition ItemInstance.h:15
Definition Material.h:8
Definition Vec3.h:10