Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
BasePressurePlateBlock.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;
18namespace BlockEvents { class BlockQueuedTickEvent; }
19// clang-format on
20
21class BasePressurePlateBlock : public ::BlockType {
22public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<8, 32, ::std::string> texture;
26 // NOLINTEND
27
28public:
29 // virtual functions
30 // NOLINTBEGIN
31 virtual ::AABB const& getVisualShape(::Block const& block, ::AABB& bufferAABB) const /*override*/;
32
33 virtual ::AABB getCollisionShape(
34 ::Block const&,
36 ::BlockPos const&,
38 ) const /*override*/;
39
40 virtual int getTickDelay() const;
41
42 virtual bool checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const
43 /*override*/;
44
45 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
46
47 virtual bool isAttachedTo(::BlockSource& region, ::BlockPos const& pos, ::BlockPos& outAttachedTo) const
48 /*override*/;
49
50 virtual bool shouldTriggerEntityInside(::BlockSource& region, ::BlockPos const& pos, ::Actor& entity) const
51 /*override*/;
52
53 virtual void entityInside(::BlockSource& region, ::BlockPos const& pos, ::Actor& entity) const /*override*/;
54
55 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
56 /*override*/;
57
58 virtual int getVariant(::Block const& block) const /*override*/;
59
60 virtual bool canSpawnOn(::Actor*) const /*override*/;
61
62 virtual int getSignalStrength(::BlockSource& region, ::BlockPos const& pos) const = 0;
63
64 virtual bool canSurvive(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
65
66 virtual int getSignalForData(int data) const = 0;
67
68 virtual int getRedstoneSignal(int signal) const = 0;
69
70 virtual ::AABB const getSensitiveAABB(::BlockPos const& pos) const;
71 // NOLINTEND
72
73public:
74 // member functions
75 // NOLINTBEGIN
76 MCNAPI void checkPressed(
77 ::BlockSource& region,
78 ::BlockPos const& pos,
79 ::Actor* sourceEntity,
80 int oldSignal,
81 int newSignal
82 ) const;
83
84 MCNAPI void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
85 // NOLINTEND
86
87public:
88 // virtual function thunks
89 // NOLINTBEGIN
90 MCNAPI ::AABB const& $getVisualShape(::Block const& block, ::AABB& bufferAABB) const;
91
92 MCNAPI ::AABB $getCollisionShape(
93 ::Block const&,
95 ::BlockPos const&,
97 ) const;
98
99 MCNAPI int $getTickDelay() const;
100
101 MCNAPI bool $checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const;
102
103 MCNAPI bool $mayPlace(::BlockSource& region, ::BlockPos const& pos) const;
104
105 MCNAPI bool $isAttachedTo(::BlockSource& region, ::BlockPos const& pos, ::BlockPos& outAttachedTo) const;
106
107 MCAPI bool $shouldTriggerEntityInside(::BlockSource& region, ::BlockPos const& pos, ::Actor& entity) const;
108
109 MCAPI void $entityInside(::BlockSource& region, ::BlockPos const& pos, ::Actor& entity) const;
110
111 MCNAPI void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
112
113 MCNAPI int $getVariant(::Block const& block) const;
114
115 MCNAPI bool $canSpawnOn(::Actor*) const;
116
117 MCNAPI bool $canSurvive(::BlockSource& region, ::BlockPos const& pos) const;
118
119 MCNAPI ::AABB const $getSensitiveAABB(::BlockPos const& pos) const;
120
121
122 // NOLINTEND
123
124public:
125 // vftables
126 // NOLINTBEGIN
127 MCNAPI static void** $vftable();
128 // NOLINTEND
129};
Definition AABB.h:18
Definition Actor.h:116
Definition BasePressurePlateBlock.h:21
MCAPI void checkPressed(::BlockSource &region, ::BlockPos const &pos, ::Actor *sourceEntity, int oldSignal, int newSignal) const
static MCAPI void ** $vftable()
MCAPI int $getVariant(::Block const &block) const
MCAPI void tick(::BlockEvents::BlockQueuedTickEvent &eventData) const
MCAPI::AABB const $getSensitiveAABB(::BlockPos const &pos) const
MCAPI bool $checkIsPathable(::Actor &entity, ::BlockPos const &lastPathPos, ::BlockPos const &pathPos) const
MCAPI bool $canSurvive(::BlockSource &region, ::BlockPos const &pos) const
MCAPI::AABB const & $getVisualShape(::Block const &block, ::AABB &bufferAABB) const
MCAPI bool $canSpawnOn(::Actor *) const
MCAPI bool $mayPlace(::BlockSource &region, ::BlockPos const &pos) const
MCAPI::AABB $getCollisionShape(::Block const &, ::IConstBlockSource const &, ::BlockPos const &, ::optional_ref<::GetCollisionShapeInterface const >) const
MCAPI void $neighborChanged(::BlockSource &region, ::BlockPos const &pos, ::BlockPos const &neighborPos) const
MCAPI int $getTickDelay() const
MCAPI bool $isAttachedTo(::BlockSource &region, ::BlockPos const &pos, ::BlockPos &outAttachedTo) const
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 optional_ref.h:10