Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
PumpkinBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/deps/shared_types/v1_26_20/block/MaterialType.h"
5#include "mc/world/level/material/Material.h"
6
7// auto generated inclusion list
8#include "mc/world/level/block/BlockType.h"
9
10// auto generated forward declare list
11// clang-format off
12class Block;
13class BlockActor;
14class BlockPos;
15class BlockSource;
16class Container;
17class ItemInstance;
18class Vec3;
19namespace BlockEvents { class BlockPlaceEvent; }
20// clang-format on
21
22class PumpkinBlock : public ::BlockType {
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<1, 1, bool> mLit;
27 ::ll::TypedStorage<1, 1, bool> mCarved;
28 // NOLINTEND
29
30public:
36 PumpkinBlock(::std::string const& nameId, int id, bool lit, bool carved)
37 : ::BlockType(nameId, id, ::Material::getMaterial(::SharedTypes::v1_26_20::MaterialType::Solid)) {
38 mLit = lit;
39 mCarved = carved;
40 mIsMobPiece = true;
41 }
42
43public:
44 // virtual functions
45 // NOLINTBEGIN
46 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
47
48 virtual int getVariant(::Block const& block) const /*override*/;
49
50 virtual uchar getMappedFace(uchar face, ::Block const& block) const /*override*/;
51
52 virtual ::ItemInstance asItemInstance(::Block const&, ::BlockActor const*) const /*override*/;
53
54 virtual bool dispense(::BlockSource& region, ::Container& container, int slot, ::Vec3 const& pos, uchar face) const
55 /*override*/;
56 // NOLINTEND
57
58public:
59 // member functions
60 // NOLINTBEGIN
61 MCAPI void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
62 // NOLINTEND
63
64public:
65 // virtual function thunks
66 // NOLINTBEGIN
67 MCAPI bool $mayPlace(::BlockSource& region, ::BlockPos const& pos) const;
68
69 MCAPI int $getVariant(::Block const& block) const;
70
71 MCAPI uchar $getMappedFace(uchar face, ::Block const& block) const;
72
73 MCAPI ::ItemInstance $asItemInstance(::Block const&, ::BlockActor const*) const;
74
75 MCAPI bool $dispense(::BlockSource& region, ::Container& container, int slot, ::Vec3 const& pos, uchar face) const;
76
77
78 // NOLINTEND
79
80public:
81 // vftables
82 // NOLINTBEGIN
83 MCNAPI static void** $vftable();
84 // NOLINTEND
85};
Definition BlockActor.h:30
Definition BlockPlaceEvent.h:16
Definition BlockPos.h:14
Definition BlockSource.h:72
Definition Block.h:42
Definition Container.h:36
Definition ItemInstance.h:15
Definition Material.h:8
static MCAPI void ** $vftable()
PumpkinBlock(::std::string const &nameId, int id, bool lit, bool carved)
Definition PumpkinBlock.h:36
Definition Vec3.h:10