Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
AnvilBlock.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/BlockSupportType.h"
8#include "mc/world/level/block/FallingBlock.h"
9
10// auto generated forward declare list
11// clang-format off
12class AABB;
13class BaseGameVersion;
14class Block;
15class BlockPos;
16class BlockSource;
18class HashedString;
20class IRandom;
21class Player;
23namespace BlockEvents { class BlockPlayerInteractEvent; }
24namespace mce { class Color; }
25// clang-format on
26
27class AnvilBlock : public ::FallingBlock {
28public:
29 // prevent constructor by default
30 AnvilBlock();
31
32public:
33 // virtual functions
34 // NOLINTBEGIN
35 virtual ::AABB getCollisionShape(
36 ::Block const& block,
38 ::BlockPos const& pos,
40 ) const /*override*/;
41
42 virtual ::AABB const&
43 getOutline(::Block const& block, ::IConstBlockSource const&, ::BlockPos const& pos, ::AABB& bufferValue) const
44 /*override*/;
45
46 virtual ::mce::Color getDustColor(::Block const&) const /*override*/;
47
48 virtual ::std::string getDustParticleName(::Block const&) const /*override*/;
49
50 virtual void animateTick(::BlockAnimateTickData const&) const /*override*/;
51
52 virtual bool falling() const /*override*/;
53
54 virtual void onLand(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
55
56 virtual bool isCraftingBlock() const /*override*/;
57
58 virtual bool breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const /*override*/;
59
60 virtual bool isInteractiveBlock() const /*override*/;
61
62 virtual bool canProvideSupport(::Block const&, uchar face, ::BlockSupportType type) const /*override*/;
63 // NOLINTEND
64
65public:
66 // member functions
67 // NOLINTBEGIN
68 MCNAPI AnvilBlock(::std::string const& nameId, int id);
69
70 MCNAPI void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
71 // NOLINTEND
72
73public:
74 // static functions
75 // NOLINTBEGIN
76 MCNAPI static ::AABB const& _getShape(::BlockPos const& pos, ::Block const& block, ::AABB& bufferValue);
77
78 MCNAPI static int getDamageForName(::HashedString const& name);
79
80 MCAPI static void tryApplyCraftingDamage(::Player const& player, ::BlockPos const& pos, ::IRandom& random);
81 // NOLINTEND
82
83public:
84 // constructor thunks
85 // NOLINTBEGIN
86 MCNAPI void* $ctor(::std::string const& nameId, int id);
87 // NOLINTEND
88
89public:
90 // virtual function thunks
91 // NOLINTBEGIN
92 MCNAPI ::AABB $getCollisionShape(
93 ::Block const& block,
95 ::BlockPos const& pos,
97 ) const;
98
99 MCNAPI ::AABB const&
100 $getOutline(::Block const& block, ::IConstBlockSource const&, ::BlockPos const& pos, ::AABB& bufferValue) const;
101
102 MCNAPI ::mce::Color $getDustColor(::Block const&) const;
103
104 MCNAPI ::std::string $getDustParticleName(::Block const&) const;
105
106 MCNAPI void $animateTick(::BlockAnimateTickData const&) const;
107
108 MCNAPI bool $falling() const;
109
110 MCNAPI void $onLand(::BlockSource& region, ::BlockPos const& pos) const;
111
112 MCNAPI bool $isCraftingBlock() const;
113
114 MCNAPI bool $breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const;
115
116 MCNAPI bool $isInteractiveBlock() const;
117
118 MCNAPI bool $canProvideSupport(::Block const&, uchar face, ::BlockSupportType type) const;
119
120
121 // NOLINTEND
122
123public:
124 // vftables
125 // NOLINTBEGIN
126 MCNAPI static void** $vftable();
127 // NOLINTEND
128};
Definition AABB.h:18
MCAPI::AABB const & $getOutline(::Block const &block, ::IConstBlockSource const &, ::BlockPos const &pos, ::AABB &bufferValue) const
MCAPI void * $ctor(::std::string const &nameId, int id)
MCAPI bool $isCraftingBlock() const
MCAPI bool $breaksFallingBlocks(::Block const &block, ::BaseGameVersion const version) const
MCAPI void $animateTick(::BlockAnimateTickData const &) const
MCAPI::AABB $getCollisionShape(::Block const &block, ::IConstBlockSource const &, ::BlockPos const &pos, ::optional_ref<::GetCollisionShapeInterface const >) const
MCAPI void use(::BlockEvents::BlockPlayerInteractEvent &eventData) const
static MCAPI void ** $vftable()
static MCAPI int getDamageForName(::HashedString const &name)
MCAPI bool $isInteractiveBlock() const
MCAPI bool $canProvideSupport(::Block const &, uchar face, ::BlockSupportType type) const
MCAPI::std::string $getDustParticleName(::Block const &) const
static MCAPI ::AABB const & _getShape(::BlockPos const &pos, ::Block const &block, ::AABB &bufferValue)
MCAPI AnvilBlock(::std::string const &nameId, int id)
MCAPI void $onLand(::BlockSource &region, ::BlockPos const &pos) const
MCAPI bool $falling() const
MCAPI::mce::Color $getDustColor(::Block const &) const
Definition BaseGameVersion.h:8
Definition BlockPlayerInteractEvent.h:18
Definition BlockPos.h:14
Definition BlockSource.h:72
Definition Block.h:42
Definition FallingBlock.h:19
Definition GetCollisionShapeInterface.h:13
Definition HashedString.h:5
Definition IConstBlockSource.h:25
Definition IRandom.h:10
Definition Player.h:131
Definition Color.h:13
Definition optional_ref.h:10
Definition BlockAnimateTickData.h:14