3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/deps/core/string/HashedString.h"
7#include "mc/deps/ecs/WeakEntityRef.h"
8#include "mc/world/actor/ai/util/ExpiringTick.h"
9#include "mc/world/level/block/actor/RandomizableBlockActorContainer.h"
24class BrushableBlockActor :
public ::RandomizableBlockActorContainer {
27 enum class BrushingState :
int {
32 enum class Placement :
int {
45 ::ll::TypedStorage<8, 24, ::std::optional<::ExpiringTick>> mBrushReset;
46 ::ll::TypedStorage<8, 24, ::std::optional<::ExpiringTick>> mBrushCooldown;
47 ::ll::TypedStorage<8, 24, ::WeakEntityRef> mDisplayEntity;
48 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStack>> mItems;
49 ::ll::TypedStorage<8, 48, ::HashedString> mBlockId;
50 ::ll::TypedStorage<4, 4, uint> mBrushCount;
51 ::ll::TypedStorage<1, 1, uchar> mBrushDirection;
52 ::ll::TypedStorage<1, 1, bool> mLootTableUnpacked;
57 BrushableBlockActor();
62 virtual ~BrushableBlockActor() =
default;
64 virtual void serverInitItemStackIds(
67 ::std::function<
void(
int,
::ItemStack const&)> onNetIdChanged
70 virtual int getContainerSize()
const ;
72 virtual int getMaxStackSize()
const ;
74 virtual ::ItemStack
const& getItem(
int slot)
const ;
76 virtual void setItem(
int slot,
::ItemStack const& item) ;
78 virtual void stopOpen(
::Actor& actor) ;
88 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(
::BlockSource&) ;
106 MCNAPI ::Actor* tryGetOrCreateDisplayEntity(
::BlockSource& region);
130 ::std::function<
void(
int,
::ItemStack const&)> onNetIdChanged
137 MCNAPI ::ItemStack
const&
$getItem(
int slot)
const;
Definition BlockActorDataPacket.h:19
Definition BlockSource.h:72
MCAPI void $serverInitItemStackIds(int containerSlot, int count, ::std::function< void(int, ::ItemStack const &)> onNetIdChanged)
MCAPI::BrushableBlockActor::BrushingState brush(::BlockSource ®ion, ::BlockPos const &pos, uchar face)
MCAPI int $getMaxStackSize() const
MCAPI void $_onUpdatePacket(::CompoundTag const &data, ::BlockSource ®ion)
MCAPI void update(::BlockSource ®ion, ::BlockPos const &pos)
MCAPI ::std::unique_ptr<::BlockActorDataPacket > $_getUpdatePacket(::BlockSource &)
MCAPI void _removeDisplayEntity(::BlockSource ®ion)
MCAPI BrushableBlockActor(::HashedString const &name, ::BlockPos const &pos, ::BrushableBlockActor::Placement placement)
MCAPI void $setItem(int slot, ::ItemStack const &item)
MCAPI void * $ctor(::HashedString const &name, ::BlockPos const &pos, ::BrushableBlockActor::Placement placement)
MCAPI void $stopOpen(::Actor &actor)
MCAPI void $load(::ILevel &level, ::CompoundTag const &tag, ::DataLoadHelper &dataLoadHelper)
MCAPI bool $save(::CompoundTag &tag, ::SaveContext const &saveContext) const
MCAPI::ItemStack const & $getItem(int slot) const
static MCAPI ::std::string getLootTableFromVariant(::BrushableBlockActor::Placement state)
MCAPI void $onChanged(::BlockSource ®ion)
MCAPI void _brushingCompleted(::BlockSource ®ion)
MCAPI int $getContainerSize() const
MCAPI void $onRemoved(::BlockSource ®ion)
Definition CompoundTag.h:18
Definition DataLoadHelper.h:20
Definition HashedString.h:5
Definition ItemStack.h:26
Definition SaveContext.h:5