Skip to content
LeviMC
English
AutoLightDark
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;
21namespace BlockEvents { class BlockPlaceEvent; }
22namespace BlockEvents { class BlockQueuedTickEvent; }
23// clang-format on
24
25class FireBlock : public ::BlockType {
26public:
27 // virtual functions
28 // NOLINTBEGIN
29 virtual ::AABB getCollisionShape(
30 ::Block const&,
32 ::BlockPos const&,
34 ) const /*override*/;
35
36 virtual ::AABB const&
37 getOutline(::Block const&, ::IConstBlockSource const&, ::BlockPos const&, ::AABB& bufferValue) const /*override*/;
38
39 virtual void animateTickBedrockLegacy(::BlockAnimateTickData const& tickData) const /*override*/;
40
41 virtual bool mayPick() const /*override*/;
42
43 virtual void entityInside(::BlockSource&, ::BlockPos const&, ::Actor& entity) const /*override*/;
44
45 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
46
47 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
48 /*override*/;
49
50 virtual bool checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const
51 /*override*/;
52 // NOLINTEND
53
54public:
55 // member functions
56 // NOLINTBEGIN
57 MCAPI void checkBurn(
58 ::BlockSource& region,
59 ::BlockPos const& pos,
60 int chance,
61 ::IRandom& random,
62 int age,
63 ::BlockPos const& firePos
64 ) const;
65
66 MCAPI void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
67
68 MCAPI void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
69 // NOLINTEND
70
71public:
72 // static functions
73 // NOLINTBEGIN
74 MCAPI static bool _trySpawnSoulFire(::BlockSource& region, ::BlockPos const& pos);
75
76 MCNAPI static ::Block const& getConnectedBlock(
77 ::IConstBlockSource const& region,
78 ::Block const& block,
79 ::BlockPos const& pos,
80 ::NeighborBlockDirections directionsToCheck
81 );
82
83#ifdef LL_PLAT_C
84 MCNAPI static ::NeighborBlockDirections getConnectionsFromState(::Block const& block);
85#endif
86
87 MCAPI static bool isValidFireLocation(::BlockSource& region, ::BlockPos const& pos);
88 // NOLINTEND
89
90public:
91 // virtual function thunks
92 // NOLINTBEGIN
93 MCNAPI ::AABB $getCollisionShape(
94 ::Block const&,
96 ::BlockPos const&,
98 ) const;
99
100 MCNAPI ::AABB const&
101 $getOutline(::Block const&, ::IConstBlockSource const&, ::BlockPos const&, ::AABB& bufferValue) const;
102
103 MCNAPI void $animateTickBedrockLegacy(::BlockAnimateTickData const& tickData) const;
104
105 MCNAPI bool $mayPick() const;
106
107 MCNAPI void $entityInside(::BlockSource&, ::BlockPos const&, ::Actor& entity) const;
108
109 MCAPI bool $mayPlace(::BlockSource& region, ::BlockPos const& pos) const;
110
111 MCNAPI void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
112
113 MCNAPI bool $checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const;
114
115
116 // NOLINTEND
117
118public:
119 // vftables
120 // NOLINTBEGIN
121 MCNAPI static void** $vftable();
122 // NOLINTEND
123};
Definition AABB.h:18
Definition Actor.h:116
Definition BlockPlaceEvent.h:16
Definition BlockQueuedTickEvent.h:16
Definition BlockPos.h:14
Definition BlockSource.h:72
Definition Block.h:42
Definition FireBlock.h:25
static MCAPI ::Block const & getConnectedBlock(::IConstBlockSource const &region, ::Block const &block, ::BlockPos const &pos, ::NeighborBlockDirections directionsToCheck)
static MCAPI void ** $vftable()
MCAPI bool $mayPick() const
MCAPI bool $checkIsPathable(::Actor &entity, ::BlockPos const &lastPathPos, ::BlockPos const &pathPos) const
MCAPI::AABB const & $getOutline(::Block const &, ::IConstBlockSource const &, ::BlockPos const &, ::AABB &bufferValue) const
MCAPI void $neighborChanged(::BlockSource &region, ::BlockPos const &pos, ::BlockPos const &neighborPos) const
MCAPI::AABB $getCollisionShape(::Block const &, ::IConstBlockSource const &, ::BlockPos const &, ::optional_ref<::GetCollisionShapeInterface const >) const
MCAPI void $entityInside(::BlockSource &, ::BlockPos const &, ::Actor &entity) const
MCAPI void $animateTickBedrockLegacy(::BlockAnimateTickData const &tickData) const
Definition GetCollisionShapeInterface.h:13
Definition IConstBlockSource.h:25
Definition IRandom.h:10
Definition NeighborBlockDirections.h:14
Definition optional_ref.h:10
Definition BlockAnimateTickData.h:14