LeviLamina
Loading...
Searching...
No Matches
TorchBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/comprehensive/ParticleType.h"
7#include "mc/deps/core/utility/optional_ref.h"
8#include "mc/world/level/block/BlockType.h"
9#include "mc/world/level/block/TorchFacing.h"
10
11// auto generated forward declare list
12// clang-format off
13class AABB;
14class Actor;
15class Block;
16class BlockPos;
17class BlockSource;
18class Experiments;
21class Vec3;
23namespace BlockEvents { class BlockPlaceEvent; }
24namespace BlockEvents { class BlockQueuedTickEvent; }
25// clang-format on
26
27class TorchBlock : public ::BlockType {
28public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<4, 4, ::ParticleType> mFlameParticle;
32 // NOLINTEND
33
34public:
35 // prevent constructor by default
36 TorchBlock();
37
38public:
39 // virtual functions
40 // NOLINTBEGIN
41 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
42
43 virtual ::Block const&
44 getPlacementBlock(::Actor const& by, ::BlockPos const& pos, uchar face, ::Vec3 const& clickPos, int itemValue) const
45 /*override*/;
46
47 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
48 /*override*/;
49
50 virtual ::AABB const& getVisualShape(::Block const& block, ::AABB& bufferAABB) const /*override*/;
51
52 virtual ::AABB getCollisionShape(
53 ::Block const&,
55 ::BlockPos const&,
57 ) const /*override*/;
58
59 virtual void animateTickBedrockLegacy(::BlockAnimateTickData const& tickData) const /*override*/;
60
61 virtual bool canSurvive(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
62
63 virtual void _addHardCodedBlockComponents(::Experiments const& experiments) /*override*/;
64 // NOLINTEND
65
66public:
67 // member functions
68 // NOLINTBEGIN
69 MCAPI TorchBlock(::std::string const& nameId, int id);
70
71 MCAPI TorchBlock(::std::string const& nameId, int id, ::ParticleType flameParticle);
72
73 MCAPI ::Vec3 _flameParticlePos(::BlockPos const& pos, ::TorchFacing dir) const;
74
75 MCAPI bool canBePlacedOn(::BlockSource& region, ::BlockPos const& pos, uchar facing) const;
76
77 MCAPI void onPlaceTorchBlock(::BlockEvents::BlockPlaceEvent& eventData) const;
78
79 MCAPI void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
80 // NOLINTEND
81
82public:
83 // static variables
84 // NOLINTBEGIN
85 MCAPI static ::std::add_lvalue_reference_t<::TorchFacing const[]> DATA_FROM_FACING();
86
87 MCAPI static ::std::add_lvalue_reference_t<ushort const[]> FACING_FROM_DATA();
88 // NOLINTEND
89
90public:
91 // constructor thunks
92 // NOLINTBEGIN
93 MCAPI void* $ctor(::std::string const& nameId, int id);
94
95 MCAPI void* $ctor(::std::string const& nameId, int id, ::ParticleType flameParticle);
96 // NOLINTEND
97
98public:
99 // virtual function thunks
100 // NOLINTBEGIN
101 MCAPI bool $mayPlace(::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 MCAPI void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
112
113 MCAPI ::AABB const& $getVisualShape(::Block const& block, ::AABB& bufferAABB) const;
114
115 MCFOLD ::AABB $getCollisionShape(
116 ::Block const&,
117 ::IConstBlockSource const&,
118 ::BlockPos const&,
120 ) const;
121
122 MCAPI void $animateTickBedrockLegacy(::BlockAnimateTickData const& tickData) const;
123
124 MCAPI bool $canSurvive(::BlockSource& region, ::BlockPos const& pos) const;
125
126 MCAPI void $_addHardCodedBlockComponents(::Experiments const& experiments);
127
128
129 // NOLINTEND
130
131public:
132 // vftables
133 // NOLINTBEGIN
134 MCAPI static void** $vftable();
135 // NOLINTEND
136};
Definition AABB.h:18
Definition Actor.h:125
Definition BlockPlaceEvent.h:18
Definition BlockQueuedTickEvent.h:18
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition Block.h:69
Definition Experiments.h:14
Definition GetCollisionShapeInterface.h:13
Definition IConstBlockSource.h:24
Definition Vec3.h:10
Definition optional_ref.h:10
Definition BlockAnimateTickData.h:14