LeviLamina
Loading...
Searching...
No Matches
ShulkerBoxBlockActor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/shared_types/legacy/LevelSoundEvent.h"
7#include "mc/world/level/block/actor/ChestBlockActor.h"
8
9// auto generated forward declare list
10// clang-format off
11class AABB;
12class Actor;
14class BlockPos;
15class BlockSource;
16class CompoundTag;
17class DataLoadHelper;
18class ILevel;
19class ItemStack;
20class ItemStackBase;
21class SaveContext;
22class Vec3;
23// clang-format on
24
25class ShulkerBoxBlockActor : public ::ChestBlockActor {
26public:
27 // member variables
28 // NOLINTBEGIN
29 ::ll::TypedStorage<1, 1, uchar> mFacing;
30 ::ll::TypedStorage<1, 1, bool> mFacingChanged;
31 // NOLINTEND
32
33public:
34 // virtual functions
35 // NOLINTBEGIN
36 virtual ~ShulkerBoxBlockActor() /*override*/ = default;
37
38 virtual ::std::string getName() const /*override*/;
39
40 virtual int getMaxStackSize() const /*override*/;
41
42 virtual void onPlace(::BlockSource& region) /*override*/;
43
44 virtual void load(::ILevel& level, ::CompoundTag const& base, ::DataLoadHelper& dataLoadHelper) /*override*/;
45
46 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
47
48 virtual void tick(::BlockSource& region) /*override*/;
49
50 virtual bool canPushInItem(int slot, int face, ::ItemStack const& item) const /*override*/;
51
52 virtual void startOpen(::Actor& actor) /*override*/;
53
54 virtual void stopOpen(::Actor& actor) /*override*/;
55
56 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
57
58 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
59
60 virtual ::SharedTypes::Legacy::LevelSoundEvent getOpenSound() const /*override*/;
61
62 virtual ::SharedTypes::Legacy::LevelSoundEvent getCloseSound() const /*override*/;
63
64 virtual ::AABB getObstructionAABB() const /*override*/;
65
66 virtual bool _detectEntityObstruction(::BlockSource& region) const /*override*/;
67 // NOLINTEND
68
69public:
70 // member functions
71 // NOLINTBEGIN
72 MCAPI ::Vec3 _calculateActorMovementIntoShulker(
73 ::std::vector<::AABB> const& intersectingAABBs,
74 ::AABB const& actorAabbAfterMovement
75 ) const;
76
77 MCAPI void _calculateBB();
78
79 MCAPI ::Vec3 _calculateMovementWithCollisions(::BlockSource& region, ::Actor* actor) const;
80
81 MCAPI void _moveCollidedEntities(::BlockSource& region) const;
82
83#ifdef LL_PLAT_C
84 MCAPI uchar getFacingDir();
85#endif
86
87 MCAPI void setFacingDir(uchar facing);
88
89 MCFOLD void setupRedstoneComponent(::BlockSource& region) const;
90 // NOLINTEND
91
92public:
93 // static functions
94 // NOLINTBEGIN
95 MCAPI static ::std::unique_ptr<::ShulkerBoxBlockActor> createShulkerBoxBlockEntity(::BlockPos const& pos);
96
97 MCAPI static bool itemAllowed(::ItemStackBase const& item);
98
99 MCAPI static bool itemAllowedInSlot(int, ::ItemStackBase const& item, int);
100 // NOLINTEND
101
102public:
103 // virtual function thunks
104 // NOLINTBEGIN
105 MCAPI ::std::string $getName() const;
106
107 MCFOLD int $getMaxStackSize() const;
108
109 MCFOLD void $onPlace(::BlockSource& region);
110
111 MCAPI void $load(::ILevel& level, ::CompoundTag const& base, ::DataLoadHelper& dataLoadHelper);
112
113 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
114
115 MCAPI void $tick(::BlockSource& region);
116
117 MCAPI bool $canPushInItem(int slot, int face, ::ItemStack const& item) const;
118
119 MCAPI void $startOpen(::Actor& actor);
120
121 MCAPI void $stopOpen(::Actor& actor);
122
123 MCFOLD ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
124
125 MCFOLD void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
126
127 MCFOLD ::SharedTypes::Legacy::LevelSoundEvent $getOpenSound() const;
128
129 MCFOLD ::SharedTypes::Legacy::LevelSoundEvent $getCloseSound() const;
130
131 MCAPI ::AABB $getObstructionAABB() const;
132
133 MCFOLD bool $_detectEntityObstruction(::BlockSource& region) const;
134
135
136 // NOLINTEND
137
138public:
139 // vftables
140 // NOLINTBEGIN
141 MCAPI static void** $vftableForFillingContainer();
142
143 MCAPI static void** $vftableForRandomizableBlockActorContainerBase();
144 // NOLINTEND
145};
Definition AABB.h:18
Definition Actor.h:125
Definition BlockActorDataPacket.h:19
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition ILevel.h:219
Definition ItemStackBase.h:52
Definition ItemStack.h:35
static MCAPI void ** $vftableForFillingContainer()
Definition SaveContext.h:5
Definition ShulkerBoxBlockActor.h:25
Definition Vec3.h:10