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