LeviLamina
Loading...
Searching...
No Matches
RespawnAnchorBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/block/BlockType.h"
7
8// auto generated forward declare list
9// clang-format off
10class Block;
11class BlockPos;
12class BlockSource;
13class Container;
14class ItemStack;
15class Level;
16class Player;
18struct Brightness;
19namespace BlockEvents { class BlockPlaceEvent; }
20namespace BlockEvents { class BlockPlayerInteractEvent; }
21// clang-format on
22
23class RespawnAnchorBlock : public ::BlockType {
24public:
25 // prevent constructor by default
26 RespawnAnchorBlock();
27
28public:
29 // virtual functions
30 // NOLINTBEGIN
31 virtual int getVariant(::Block const& block) const /*override*/;
32
33 virtual void animateTickBedrockLegacy(::BlockAnimateTickData const& tickData) const /*override*/;
34
35 virtual bool isInteractiveBlock() const /*override*/;
36
37 virtual ::Brightness getLightEmission(::Block const& block) const /*override*/;
38
39 virtual bool canSpawnAt(::BlockSource const& region, ::BlockPos const& pos) const /*override*/;
40
41 virtual void notifySpawnedAt(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
42
43 virtual bool hasComparatorSignal() const /*override*/;
44
45 virtual int getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const&, uchar) const
46 /*override*/;
47 // NOLINTEND
48
49public:
50 // member functions
51 // NOLINTBEGIN
52 MCAPI RespawnAnchorBlock(::std::string const& nameId, int id);
53
54 MCAPI void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
55
56 MCAPI void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
57 // NOLINTEND
58
59public:
60 // static functions
61 // NOLINTBEGIN
62 MCAPI static void _bumpCharge(::BlockSource& region, ::BlockPos const& pos, ::Player* source, short delta);
63
64 MCAPI static void
65 _explode(::Player& player, ::BlockPos const& anchorBlockPos, ::BlockSource& region, ::Level& level);
66
67 MCAPI static bool _isInWater(::BlockSource const& region, ::BlockPos const& pos);
68
69 MCAPI static bool
70 _tryCharge(::Player& player, ::BlockPos const& anchorBlockPos, ::BlockSource& region, ::Level& level);
71
72 MCAPI static bool
73 _trySetSpawn(::Player& player, ::BlockPos const& anchorBlockPos, ::BlockSource& region, ::Level& level);
74
75 MCAPI static bool
76 addItem(::ItemStack const& item, ::BlockSource& region, ::Block const& block, ::BlockPos const& pos);
77
78 MCAPI static bool addItem(
79 ::Container& fromContainer,
80 int slot,
81 ::ItemStack const& item,
82 ::BlockSource& region,
83 ::Block const& block,
84 ::BlockPos const& pos
85 );
86 // NOLINTEND
87
88public:
89 // constructor thunks
90 // NOLINTBEGIN
91 MCAPI void* $ctor(::std::string const& nameId, int id);
92 // NOLINTEND
93
94public:
95 // virtual function thunks
96 // NOLINTBEGIN
97 MCAPI int $getVariant(::Block const& block) const;
98
99 MCAPI void $animateTickBedrockLegacy(::BlockAnimateTickData const& tickData) const;
100
101 MCFOLD bool $isInteractiveBlock() const;
102
103 MCAPI ::Brightness $getLightEmission(::Block const& block) const;
104
105 MCAPI bool $canSpawnAt(::BlockSource const& region, ::BlockPos const& pos) const;
106
107 MCAPI void $notifySpawnedAt(::BlockSource& region, ::BlockPos const& pos) const;
108
109 MCFOLD bool $hasComparatorSignal() const;
110
111 MCAPI int $getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const&, uchar) const;
112
113
114 // NOLINTEND
115
116public:
117 // vftables
118 // NOLINTBEGIN
119 MCAPI static void** $vftable();
120 // NOLINTEND
121};
Definition BlockPlaceEvent.h:18
Definition BlockPlayerInteractEvent.h:20
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition Block.h:69
Definition Container.h:34
Definition ItemStack.h:35
Definition Level.h:255
Definition Player.h:137
Definition BlockAnimateTickData.h:14
Definition Brightness.h:8