LeviLamina
Loading...
Searching...
No Matches
FireBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/optional_ref.h"
7#include "mc/world/level/block/BlockType.h"
8
9// auto generated forward declare list
10// clang-format off
11class AABB;
12class Actor;
13class Block;
14class BlockPos;
15class BlockSource;
18class IRandom;
20namespace BlockEvents { class BlockPlaceEvent; }
21namespace BlockEvents { class BlockQueuedTickEvent; }
22// clang-format on
23
24class FireBlock : public ::BlockType {
25public:
26 // prevent constructor by default
27 FireBlock();
28
29public:
30 // virtual functions
31 // NOLINTBEGIN
32 virtual ::AABB getCollisionShape(
33 ::Block const&,
35 ::BlockPos const&,
37 ) const /*override*/;
38
39 virtual ::AABB const&
40 getOutline(::Block const& bufferValue, ::IConstBlockSource const&, ::BlockPos const&, ::AABB&) const /*override*/;
41
42 virtual void animateTickBedrockLegacy(::BlockAnimateTickData const& tickData) const /*override*/;
43
44 virtual bool mayPick() const /*override*/;
45
46 virtual void entityInside(::BlockSource& entity, ::BlockPos const&, ::Actor&) const /*override*/;
47
48 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
49
50 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
51 /*override*/;
52
53 virtual bool checkIsPathable(::Actor& entity, ::BlockPos const&, ::BlockPos const&) const /*override*/;
54 // NOLINTEND
55
56public:
57 // member functions
58 // NOLINTBEGIN
59 MCAPI FireBlock(::std::string const& nameId, int id);
60
61 MCAPI bool _trySpawnSoulFire(::BlockSource& region, ::BlockPos const& pos) const;
62
63 MCAPI void checkBurn(
64 ::BlockSource& region,
65 ::BlockPos const& pos,
66 int chance,
67 ::IRandom& random,
68 int age,
69 ::BlockPos const& firePos
70 ) const;
71
72 MCAPI float getFireOdds(::BlockSource& region, ::BlockPos const& pos) const;
73
74 MCAPI bool isValidFireLocation(::BlockSource& region, ::BlockPos const& pos) const;
75
76 MCAPI void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
77
78 MCAPI void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
79 // NOLINTEND
80
81public:
82 // static functions
83 // NOLINTBEGIN
84#ifdef LL_PLAT_C
85 MCAPI static bool canBurn(::BlockSource& region, ::BlockPos const& pos);
86
87 MCAPI static bool isSolidToppedBlock(::IConstBlockSource const& region, ::BlockPos const& pos);
88#endif
89 // NOLINTEND
90
91public:
92 // constructor thunks
93 // NOLINTBEGIN
94 MCAPI void* $ctor(::std::string const& nameId, int id);
95 // NOLINTEND
96
97public:
98 // virtual function thunks
99 // NOLINTBEGIN
100 MCFOLD ::AABB $getCollisionShape(
101 ::Block const&,
102 ::IConstBlockSource const&,
103 ::BlockPos const&,
105 ) const;
106
107 MCFOLD ::AABB const&
108 $getOutline(::Block const& bufferValue, ::IConstBlockSource const&, ::BlockPos const&, ::AABB&) const;
109
110 MCAPI void $animateTickBedrockLegacy(::BlockAnimateTickData const& tickData) const;
111
112 MCFOLD bool $mayPick() const;
113
114 MCAPI void $entityInside(::BlockSource& entity, ::BlockPos const&, ::Actor&) const;
115
116 MCAPI bool $mayPlace(::BlockSource& region, ::BlockPos const& pos) const;
117
118 MCAPI void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
119
120 MCAPI bool $checkIsPathable(::Actor& entity, ::BlockPos const&, ::BlockPos const&) const;
121
122
123 // NOLINTEND
124
125public:
126 // vftables
127 // NOLINTBEGIN
128 MCAPI static void** $vftable();
129 // NOLINTEND
130};
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 GetCollisionShapeInterface.h:13
Definition IConstBlockSource.h:24
Definition IRandom.h:10
Definition optional_ref.h:10
Definition BlockAnimateTickData.h:14