LeviLamina
Loading...
Searching...
No Matches
PistonBlock.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/BlockLegacy.h"
9#include "mc/world/level/block/BlockSupportType.h"
10
11// auto generated forward declare list
12// clang-format off
13class Actor;
14class BaseGameVersion;
15class Block;
16class BlockPos;
17class BlockSource;
18class Experiments;
20class Vec3;
21namespace BlockEvents { class BlockPlaceEvent; }
22namespace BlockEvents { class BlockQueuedTickEvent; }
23// clang-format on
24
25class PistonBlock : public ::ActorBlock {
26public:
27 // PistonBlock inner types define
28 enum class Type : int {
29 Normal = 0,
30 Sticky = 1,
31 };
32
33public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<4, 4, ::PistonBlock::Type> mType;
37 // NOLINTEND
38
39public:
40 // virtual functions
41 // NOLINTBEGIN
42 // vIndex: 66
43 virtual void setupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
44
45 // vIndex: 91
46 virtual ::Block const&
47 getPlacementBlock(::Actor const& by, ::BlockPos const& pos, uchar face, ::Vec3 const& clickPos, int itemValue) const
48 /*override*/;
49
50 // vIndex: 60
51 virtual void onRedstoneUpdate(::BlockSource& region, ::BlockPos const& pos, int strength, bool isFirstTime) const
52 /*override*/;
53
54 // vIndex: 22
55 virtual bool canProvideSupport(::Block const&, uchar, ::BlockSupportType) const /*override*/;
56
57 // vIndex: 86
58 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
59 /*override*/;
60
61 // vIndex: 87
62 virtual bool getSecondPart(::IConstBlockSource const& region, ::BlockPos const& pos, ::BlockPos& out) const
63 /*override*/;
64
65 // vIndex: 53
66 virtual bool
67 shouldConnectToRedstone(::BlockSource& region, ::BlockPos const& pos, ::Direction::Type direction) const
68 /*override*/;
69
70 // vIndex: 47
71 virtual bool isValidAuxValue(int value) const /*override*/;
72
73 // vIndex: 138
74 virtual bool canSurvive(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
75
76 // vIndex: 117
77 virtual int getVariant(::Block const& block) const /*override*/;
78
79 // vIndex: 120
80 virtual uchar getMappedFace(uchar face, ::Block const& block) const /*override*/;
81
82 // vIndex: 83
83 virtual bool breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const /*override*/;
84
85 // vIndex: 102
86 virtual bool pushesUpFallingBlocks() const /*override*/;
87
88 // vIndex: 130
89 virtual void _addHardCodedBlockComponents(::Experiments const&) /*override*/;
90
91 // vIndex: 0
92 virtual ~PistonBlock() /*override*/ = default;
93 // NOLINTEND
94
95public:
96 // member functions
97 // NOLINTBEGIN
98 MCNAPI void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
99
100 MCNAPI void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
101 // NOLINTEND
102
103public:
104 // static variables
105 // NOLINTBEGIN
106 MCNAPI static ::std::add_lvalue_reference_t<::BlockPos const[]> ARM_DIRECTION_OFFSETS();
107 // NOLINTEND
108
109public:
110 // virtual function thunks
111 // NOLINTBEGIN
112 MCNAPI void $setupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos) const;
113
114 MCNAPI ::Block const& $getPlacementBlock(
115 ::Actor const& by,
116 ::BlockPos const& pos,
117 uchar face,
118 ::Vec3 const& clickPos,
119 int itemValue
120 ) const;
121
122 MCNAPI void $onRedstoneUpdate(::BlockSource& region, ::BlockPos const& pos, int strength, bool isFirstTime) const;
123
124 MCNAPI bool $canProvideSupport(::Block const&, uchar, ::BlockSupportType) const;
125
126 MCNAPI void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
127
128 MCNAPI bool $getSecondPart(::IConstBlockSource const& region, ::BlockPos const& pos, ::BlockPos& out) const;
129
130 MCNAPI bool
131 $shouldConnectToRedstone(::BlockSource& region, ::BlockPos const& pos, ::Direction::Type direction) const;
132
133 MCNAPI bool $isValidAuxValue(int value) const;
134
135 MCNAPI bool $canSurvive(::BlockSource& region, ::BlockPos const& pos) const;
136
137 MCNAPI int $getVariant(::Block const& block) const;
138
139 MCNAPI uchar $getMappedFace(uchar face, ::Block const& block) const;
140
141 MCNAPI bool $breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const;
142
143 MCNAPI bool $pushesUpFallingBlocks() const;
144
146 // NOLINTEND
147
148public:
149 // vftables
150 // NOLINTBEGIN
151 MCNAPI static void** $vftable();
152 // NOLINTEND
153};
Definition ActorBlockBase.h:6
Definition Actor.h:103
Definition BaseGameVersion.h:8
Definition BlockPlaceEvent.h:16
Definition BlockQueuedTickEvent.h:16
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition Block.h:38
Definition Experiments.h:14
Definition IConstBlockSource.h:24
Definition PistonBlock.h:25
MCAPI void $neighborChanged(::BlockSource &region, ::BlockPos const &pos, ::BlockPos const &neighborPos) const
MCAPI bool $breaksFallingBlocks(::Block const &block, ::BaseGameVersion const version) const
MCAPI void $setupRedstoneComponent(::BlockSource &region, ::BlockPos const &pos) const
MCAPI bool $getSecondPart(::IConstBlockSource const &region, ::BlockPos const &pos, ::BlockPos &out) const
MCAPI void onPlace(::BlockEvents::BlockPlaceEvent &eventData) const
MCAPI void $onRedstoneUpdate(::BlockSource &region, ::BlockPos const &pos, int strength, bool isFirstTime) const
MCAPI bool $isValidAuxValue(int value) const
MCAPI void tick(::BlockEvents::BlockQueuedTickEvent &eventData) const
MCAPI bool $pushesUpFallingBlocks() const
static MCAPI ::std::add_lvalue_reference_t<::BlockPos const[]> ARM_DIRECTION_OFFSETS()
MCAPI bool $canSurvive(::BlockSource &region, ::BlockPos const &pos) const
MCAPI bool $shouldConnectToRedstone(::BlockSource &region, ::BlockPos const &pos, ::Direction::Type direction) const
MCAPI uchar $getMappedFace(uchar face, ::Block const &block) const
MCAPI void $_addHardCodedBlockComponents(::Experiments const &)
MCAPI bool $canProvideSupport(::Block const &, uchar, ::BlockSupportType) const
static MCAPI void ** $vftable()
MCAPI::Block const & $getPlacementBlock(::Actor const &by, ::BlockPos const &pos, uchar face, ::Vec3 const &clickPos, int itemValue) const
MCAPI int $getVariant(::Block const &block) const
Definition Vec3.h:10