Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
SeagrassBlock.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/item/FertilizerType.h"
8#include "mc/world/level/block/BlockType.h"
9
10// auto generated forward declare list
11// clang-format off
12class AABB;
13class Actor;
14class Block;
15class BlockPos;
16class BlockSource;
19namespace BlockEvents { class BlockPlaceEvent; }
20namespace BlockEvents { class BlockQueuedTickEvent; }
21// clang-format on
22
23class SeagrassBlock : public ::BlockType {
24public:
25 // virtual functions
26 // NOLINTBEGIN
27 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
28
29 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
30 /*override*/;
31
32 virtual bool
33 onFertilized(::BlockSource& region, ::BlockPos const& pos, ::Actor* actor, ::FertilizerType fType) const
34 /*override*/;
35
36 virtual bool mayConsumeFertilizer(::BlockSource& region) const /*override*/;
37
38 virtual bool canBeFertilized(::BlockSource& region, ::BlockPos const& pos, ::Block const& aboveBlock) const
39 /*override*/;
40
41 virtual bool canSurvive(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
42
43 virtual ::std::string buildDescriptionId(::Block const&) const /*override*/;
44
45 virtual ::AABB getCollisionShape(
46 ::Block const&,
48 ::BlockPos const&,
50 ) const /*override*/;
51
52 virtual bool isValidAuxValue(int value) const /*override*/;
53 // NOLINTEND
54
55public:
56 // member functions
57 // NOLINTBEGIN
58 MCNAPI void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
59
60 MCNAPI void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
61 // NOLINTEND
62
63public:
64 // static functions
65 // NOLINTBEGIN
66 MCNAPI static bool trySpawnSeaGrass(::BlockSource& region, ::BlockPos const& pos);
67 // NOLINTEND
68
69public:
70 // virtual function thunks
71 // NOLINTBEGIN
72 MCNAPI bool $mayPlace(::BlockSource& region, ::BlockPos const& pos) const;
73
74 MCNAPI void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
75
76 MCNAPI bool
77 $onFertilized(::BlockSource& region, ::BlockPos const& pos, ::Actor* actor, ::FertilizerType fType) const;
78
79 MCNAPI bool $mayConsumeFertilizer(::BlockSource& region) const;
80
81 MCNAPI bool $canBeFertilized(::BlockSource& region, ::BlockPos const& pos, ::Block const& aboveBlock) const;
82
83 MCNAPI bool $canSurvive(::BlockSource& region, ::BlockPos const& pos) const;
84
85 MCNAPI ::std::string $buildDescriptionId(::Block const&) const;
86
87 MCNAPI ::AABB $getCollisionShape(
88 ::Block const&,
90 ::BlockPos const&,
92 ) const;
93
94 MCNAPI bool $isValidAuxValue(int value) const;
95
96
97 // NOLINTEND
98
99public:
100 // vftables
101 // NOLINTBEGIN
102 MCNAPI static void** $vftable();
103 // NOLINTEND
104};
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 GetCollisionShapeInterface.h:13
Definition IConstBlockSource.h:25
Definition SeagrassBlock.h:23
MCAPI bool $mayPlace(::BlockSource &region, ::BlockPos const &pos) const
MCAPI bool $isValidAuxValue(int value) const
MCAPI::AABB $getCollisionShape(::Block const &, ::IConstBlockSource const &, ::BlockPos const &, ::optional_ref<::GetCollisionShapeInterface const >) const
MCAPI::std::string $buildDescriptionId(::Block const &) const
MCAPI bool $canSurvive(::BlockSource &region, ::BlockPos const &pos) const
MCAPI void onPlace(::BlockEvents::BlockPlaceEvent &eventData) const
MCAPI bool $canBeFertilized(::BlockSource &region, ::BlockPos const &pos, ::Block const &aboveBlock) const
MCAPI void $neighborChanged(::BlockSource &region, ::BlockPos const &pos, ::BlockPos const &neighborPos) const
static MCAPI bool trySpawnSeaGrass(::BlockSource &region, ::BlockPos const &pos)
MCAPI bool $onFertilized(::BlockSource &region, ::BlockPos const &pos, ::Actor *actor, ::FertilizerType fType) const
MCAPI void tick(::BlockEvents::BlockQueuedTickEvent &eventData) const
MCAPI bool $mayConsumeFertilizer(::BlockSource &region) const
static MCAPI void ** $vftable()
Definition optional_ref.h:10