LeviLamina
Loading...
Searching...
No Matches
NoteBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/block/ActorBlockBase.h"
7#include "mc/world/level/block/BlockType.h"
8
9// auto generated forward declare list
10// clang-format off
11class BlockPos;
12class BlockSource;
13class Level;
14class Player;
15class Vec3;
16namespace BlockEvents { class BlockPlayerInteractEvent; }
17namespace BlockEvents { class BlockRedstoneUpdateEvent; }
18// clang-format on
19
20class NoteBlock : public ::ActorBlock {
21public:
22 // member variables
23 // NOLINTBEGIN
24 ::ll::TypedStorage<1, 1, bool> mSkullPlacementEnabled;
25 // NOLINTEND
26
27public:
28 // prevent constructor by default
29 NoteBlock();
30
31public:
32 // virtual functions
33 // NOLINTBEGIN
34 virtual bool isInteractiveBlock() const /*override*/;
35
36 virtual bool attack(::Player* player, ::BlockPos const& pos) const /*override*/;
37
38 virtual void triggerEvent(::BlockSource& region, ::BlockPos const& pos, int instrument, int note) const
39 /*override*/;
40 // NOLINTEND
41
42public:
43 // member functions
44 // NOLINTBEGIN
45 MCAPI NoteBlock(::std::string const& nameId, int id);
46
47 MCAPI void _onRedstoneUpdate(::BlockEvents::BlockRedstoneUpdateEvent& blockEvent) const;
48
49 MCAPI void _triggerNoteParticle(::Level& level, ::Vec3 const& vPos, int note) const;
50
51 MCAPI ::NoteBlock& enableSkullPlacement(bool enabled);
52
53#ifdef LL_PLAT_C
54 MCFOLD bool skullPlacementEnabled() const;
55#endif
56
57 MCAPI void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
58 // NOLINTEND
59
60public:
61 // static functions
62 // NOLINTBEGIN
63#ifdef LL_PLAT_C
64 MCAPI static float getPitch(int note);
65#endif
66 // NOLINTEND
67
68public:
69 // constructor thunks
70 // NOLINTBEGIN
71 MCAPI void* $ctor(::std::string const& nameId, int id);
72 // NOLINTEND
73
74public:
75 // virtual function thunks
76 // NOLINTBEGIN
77 MCFOLD bool $isInteractiveBlock() const;
78
79 MCAPI bool $attack(::Player* player, ::BlockPos const& pos) const;
80
81 MCAPI void $triggerEvent(::BlockSource& region, ::BlockPos const& pos, int instrument, int note) const;
82
83
84 // NOLINTEND
85
86public:
87 // vftables
88 // NOLINTBEGIN
89 MCAPI static void** $vftable();
90 // NOLINTEND
91};
Definition BlockPlayerInteractEvent.h:20
Definition BlockRedstoneUpdateEvent.h:16
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition Level.h:255
Definition Player.h:137
Definition Vec3.h:10