LeviLamina
Loading...
Searching...
No Matches
BellBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/Direction.h"
7#include "mc/world/level/block/ActorBlockBase.h"
8#include "mc/world/level/block/BlockType.h"
9
10// auto generated forward declare list
11// clang-format off
12class AABB;
13class Actor;
14class Block;
15class BlockPos;
16class BlockSource;
17class Vec3;
18namespace BlockEvents { class BlockPlayerInteractEvent; }
19namespace BlockEvents { class BlockQueuedTickEvent; }
20// clang-format on
21
22class BellBlock : public ::ActorBlock {
23public:
24 // prevent constructor by default
25 BellBlock();
26
27public:
28 // virtual functions
29 // NOLINTBEGIN
30 virtual ::AABB const& getVisualShape(::Block const& block, ::AABB& bufferAABB) const /*override*/;
31
32 virtual ::Block const&
33 getPlacementBlock(::Actor const& by, ::BlockPos const& pos, uchar face, ::Vec3 const& clickPos, int itemValue) const
34 /*override*/;
35
36 virtual void entityInside(::BlockSource& region, ::BlockPos const& pos, ::Actor& actor) const /*override*/;
37
38 virtual bool canSurvive(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
39
40 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
41 /*override*/;
42
43 virtual void movedByPiston(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
44
45 virtual bool shouldConnectToRedstone(::BlockSource&, ::BlockPos const&, ::Direction::Type) const /*override*/;
46
47 virtual void onProjectileHit(::BlockSource& region, ::BlockPos const& pos, ::Actor const& projectile) const
48 /*override*/;
49
50 virtual bool isInteractiveBlock() const /*override*/;
51
52 virtual void _onHitByActivatingAttack(::BlockSource& region, ::BlockPos const& pos, ::Actor* sourceActor) const
53 /*override*/;
54 // NOLINTEND
55
56public:
57 // member functions
58 // NOLINTBEGIN
59 MCAPI BellBlock(::std::string const& nameId, int id);
60
61 MCAPI ::Block const&
62 _determineAttachment(::Actor const& by, ::BlockSource& region, ::BlockPos const& pos, uchar face) const;
63
64 MCAPI short _getItemId(::BlockSource const& region, ::std::string_view itemName) const;
65
66 MCAPI void _sendBellUsedEventToClient(::BlockSource const& region, ::Actor const& sourceActor) const;
67
68 MCAPI void _tryAttachToNeighbors(
69 ::BlockSource& region,
70 ::BlockPos const& pos,
71 ::BlockPos const& neighborPos,
72 int updateFlags
73 ) const;
74
75 MCAPI bool hasValidAttachment(::Block const& block, ::BlockSource& region, ::BlockPos const& pos) const;
76
77 MCFOLD void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
78
79 MCAPI void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
80 // NOLINTEND
81
82public:
83 // constructor thunks
84 // NOLINTBEGIN
85 MCAPI void* $ctor(::std::string const& nameId, int id);
86 // NOLINTEND
87
88public:
89 // virtual function thunks
90 // NOLINTBEGIN
91 MCAPI ::AABB const& $getVisualShape(::Block const& block, ::AABB& bufferAABB) const;
92
93 MCAPI ::Block const& $getPlacementBlock(
94 ::Actor const& by,
95 ::BlockPos const& pos,
96 uchar face,
97 ::Vec3 const& clickPos,
98 int itemValue
99 ) const;
100
101 MCAPI void $entityInside(::BlockSource& region, ::BlockPos const& pos, ::Actor& actor) const;
102
103 MCAPI bool $canSurvive(::BlockSource& region, ::BlockPos const& pos) const;
104
105 MCAPI void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
106
107 MCAPI void $movedByPiston(::BlockSource& region, ::BlockPos const& pos) const;
108
109 MCFOLD bool $shouldConnectToRedstone(::BlockSource&, ::BlockPos const&, ::Direction::Type) const;
110
111 MCAPI void $onProjectileHit(::BlockSource& region, ::BlockPos const& pos, ::Actor const& projectile) const;
112
113 MCFOLD bool $isInteractiveBlock() const;
114
115 MCAPI void $_onHitByActivatingAttack(::BlockSource& region, ::BlockPos const& pos, ::Actor* sourceActor) const;
116
117
118 // NOLINTEND
119
120public:
121 // vftables
122 // NOLINTBEGIN
123 MCAPI static void** $vftable();
124 // NOLINTEND
125};
Definition AABB.h:18
Definition Actor.h:125
Definition BlockPlayerInteractEvent.h:20
Definition BlockQueuedTickEvent.h:18
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition Block.h:69
Definition Vec3.h:10