Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
SlabBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/string/HashedString.h"
7#include "mc/world/level/block/BlockSupportType.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 BaseGameVersion;
15class Block;
16class BlockActor;
17class BlockPos;
18class BlockSource;
19class Experiments;
20class ItemInstance;
21class Material;
22class MobSpawnerData;
23class SpawnConditions;
24// clang-format on
25
26class SlabBlock : public ::BlockType {
27public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<1, 1, bool> mIsDouble;
31 ::ll::TypedStorage<8, 48, ::HashedString> mOtherSlab;
32 // NOLINTEND
33
34public:
35 // prevent constructor by default
36 SlabBlock();
37
38public:
39 // virtual functions
40 // NOLINTBEGIN
41 virtual bool isSlabBlock() const /*override*/;
42
43 virtual ::AABB const& getVisualShape(::Block const& block, ::AABB& bufferAABB) const /*override*/;
44
45 virtual bool isObstructingChests(::BlockSource& region, ::BlockPos const& pos, ::Block const& thisBlock) const
46 /*override*/;
47
48 virtual bool checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const
49 /*override*/;
50
51 virtual ::MobSpawnerData const* getMobToSpawn(::SpawnConditions const& conditions, ::BlockSource& region) const
52 /*override*/;
53
54 virtual bool liquidCanFlowIntoFromDirection(
55 uchar flowIntoFacing,
56 ::std::function<::Block const&(::BlockPos const&)> const& getBlock,
57 ::BlockPos const& pos
58 ) const /*override*/;
59
60 virtual ::ItemInstance asItemInstance(::Block const&, ::BlockActor const*) const /*override*/;
61
62 virtual bool breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const /*override*/;
63
64 virtual bool canProvideSupport(::Block const& block, uchar face, ::BlockSupportType) const /*override*/;
65
66 virtual void _addHardCodedBlockComponents(::Experiments const& experiments) /*override*/;
67 // NOLINTEND
68
69public:
70 // member functions
71 // NOLINTBEGIN
72 MCNAPI SlabBlock(
73 ::std::string const& nameId,
74 int id,
75 bool isDouble,
76 ::Material const& mat,
77 ::HashedString const& otherSlab
78 );
79
80 MCNAPI ::Block const& getDoubleSlab() const;
81 // NOLINTEND
82
83public:
84 // static variables
85 // NOLINTBEGIN
86 MCNAPI static ::BaseGameVersion const& TOP_SLAB_DOESNT_BREAK_FALLING_BLOCK_VERSION();
87 // NOLINTEND
88
89public:
90 // constructor thunks
91 // NOLINTBEGIN
92 MCNAPI void*
93 $ctor(::std::string const& nameId, int id, bool isDouble, ::Material const& mat, ::HashedString const& otherSlab);
94 // NOLINTEND
95
96public:
97 // virtual function thunks
98 // NOLINTBEGIN
99 MCNAPI bool $isSlabBlock() const;
100
101 MCNAPI ::AABB const& $getVisualShape(::Block const& block, ::AABB& bufferAABB) const;
102
103 MCNAPI bool $isObstructingChests(::BlockSource& region, ::BlockPos const& pos, ::Block const& thisBlock) const;
104
105 MCNAPI bool $checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const;
106
107 MCNAPI ::MobSpawnerData const* $getMobToSpawn(::SpawnConditions const& conditions, ::BlockSource& region) const;
108
110 uchar flowIntoFacing,
111 ::std::function<::Block const&(::BlockPos const&)> const& getBlock,
112 ::BlockPos const& pos
113 ) const;
114
115 MCNAPI ::ItemInstance $asItemInstance(::Block const&, ::BlockActor const*) const;
116
117 MCNAPI bool $breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const;
118
119 MCNAPI bool $canProvideSupport(::Block const& block, uchar face, ::BlockSupportType) const;
120
121 MCNAPI void $_addHardCodedBlockComponents(::Experiments const& experiments);
122
123
124 // NOLINTEND
125
126public:
127 // vftables
128 // NOLINTBEGIN
129 MCNAPI static void** $vftable();
130 // NOLINTEND
131};
Definition AABB.h:18
Definition Actor.h:116
Definition BaseGameVersion.h:8
Definition BlockActor.h:30
Definition BlockPos.h:14
Definition BlockSource.h:72
Definition Block.h:42
Definition Experiments.h:14
Definition HashedString.h:5
Definition ItemInstance.h:15
Definition Material.h:8
Definition MobSpawnerData.h:17
MCAPI::AABB const & $getVisualShape(::Block const &block, ::AABB &bufferAABB) const
MCAPI bool $checkIsPathable(::Actor &entity, ::BlockPos const &lastPathPos, ::BlockPos const &pathPos) const
MCAPI void $_addHardCodedBlockComponents(::Experiments const &experiments)
MCAPI bool $liquidCanFlowIntoFromDirection(uchar flowIntoFacing, ::std::function<::Block const &(::BlockPos const &)> const &getBlock, ::BlockPos const &pos) const
static MCAPI void ** $vftable()
MCAPI SlabBlock(::std::string const &nameId, int id, bool isDouble, ::Material const &mat, ::HashedString const &otherSlab)
MCAPI bool $canProvideSupport(::Block const &block, uchar face, ::BlockSupportType) const
MCAPI bool $isObstructingChests(::BlockSource &region, ::BlockPos const &pos, ::Block const &thisBlock) const
MCAPI bool $breaksFallingBlocks(::Block const &block, ::BaseGameVersion const version) const
static MCAPI ::BaseGameVersion const & TOP_SLAB_DOESNT_BREAK_FALLING_BLOCK_VERSION()
MCAPI void * $ctor(::std::string const &nameId, int id, bool isDouble, ::Material const &mat, ::HashedString const &otherSlab)
MCAPI::ItemInstance $asItemInstance(::Block const &, ::BlockActor const *) const
MCAPI bool $isSlabBlock() const
MCAPI::Block const & getDoubleSlab() const
MCAPI::MobSpawnerData const * $getMobToSpawn(::SpawnConditions const &conditions, ::BlockSource &region) const
Definition SpawnConditions.h:8