LeviLamina
Loading...
Searching...
No Matches
BrushableBlockActor Class Reference
+ Inheritance diagram for BrushableBlockActor:

Public Types

enum class  BrushingState : int { Ongoing = 0 , Completed = 1 }
 
enum class  Placement : int {
  DesertWell = 0 , DesertPyramid = 1 , ColdOceanRuin = 2 , WarmOceanRuin = 3 ,
  TrailRuinsCommon = 4 , TrailRuinsRare = 5 , Empty = 6
}
 
using MapIdType = ::std::map<::std::string, ::BlockActorType>
 
using MapTypeId = ::std::map<::BlockActorType, ::std::string>
 
using ItemStackNetIdChangedCallback = ::std::function<void(int, ::ItemStack const&)>
 
using TransactionContext = std::function<void(Container&, int, ItemStack const&, ItemStack const&)>
 
using Iterator = ContainerIterator<Container>
 
using ConstIterator = ContainerIterator<Container const>
 
using ReverseIterator = std::reverse_iterator<Iterator>
 
using ConstReverseIterator = std::reverse_iterator<ConstIterator>
 

Public Member Functions

virtual void serverInitItemStackIds (int containerSlot, int count, ::std::function< void(int, ::ItemStack const &)> onNetIdChanged)
 
virtual int getContainerSize () const
 
virtual int getMaxStackSize () const
 
virtual::ItemStack const & getItem (int slot) const
 
virtual void setItem (int slot, ::ItemStack const &item)
 
virtual void stopOpen (::Player &player)
 
virtual void onChanged (::BlockSource &region)
 
virtual void onRemoved (::BlockSource &region)
 
virtual void load (::ILevel &level, ::CompoundTag const &tag, ::DataLoadHelper &dataLoadHelper)
 
virtual bool save (::CompoundTag &tag, ::SaveContext const &saveContext) const
 
virtual ::std::unique_ptr<::BlockActorDataPacket_getUpdatePacket (::BlockSource &)
 
virtual void _onUpdatePacket (::CompoundTag const &data, ::BlockSource &region)
 
MCAPI BrushableBlockActor (::HashedString const &name, ::BlockPos const &pos, ::BrushableBlockActor::Placement placement)
 
MCAPI void _brushingCompleted (::BlockSource &region)
 
MCAPI void _removeDisplayEntity (::BlockSource &region)
 
MCAPI::BrushableBlockActor::BrushingState brush (::BlockSource &region, ::BlockPos const &pos, uchar face)
 
MCAPI void update (::BlockSource &region, ::BlockPos const &pos)
 
MCAPI void * $ctor (::HashedString const &name, ::BlockPos const &pos, ::BrushableBlockActor::Placement placement)
 
MCAPI void $dtor ()
 
MCAPI void $serverInitItemStackIds (int containerSlot, int count, ::std::function< void(int, ::ItemStack const &)> onNetIdChanged)
 
MCFOLD int $getContainerSize () const
 
MCFOLD int $getMaxStackSize () const
 
MCAPI::ItemStack const & $getItem (int slot) const
 
MCAPI void $setItem (int slot, ::ItemStack const &item)
 
MCFOLD void $stopOpen (::Player &player)
 
MCAPI void $onChanged (::BlockSource &region)
 
MCAPI void $onRemoved (::BlockSource &region)
 
MCAPI void $load (::ILevel &level, ::CompoundTag const &tag, ::DataLoadHelper &dataLoadHelper)
 
MCAPI bool $save (::CompoundTag &tag, ::SaveContext const &saveContext) const
 
MCFOLD ::std::unique_ptr<::BlockActorDataPacket$_getUpdatePacket (::BlockSource &)
 
MCFOLD void $_onUpdatePacket (::CompoundTag const &data, ::BlockSource &region)
 
virtual void setContainerChanged (int slot)
 
virtual void startOpen (::Player &player)
 
virtual void dropSlotContent (::BlockSource &region, ::Vec3 const &pos, bool randomizeDrop, int slot)
 
virtual void dropContents (::BlockSource &region, ::Vec3 const &pos, bool randomizeDrop)
 
virtual void initializeContainerContents (::BlockSource &region)
 
MCFOLD void $setContainerChanged (int slot)
 
MCFOLD void $startOpen (::Player &player)
 
MCFOLD void $dropSlotContent (::BlockSource &region, ::Vec3 const &pos, bool randomizeDrop, int slot)
 
MCFOLD void $dropContents (::BlockSource &region, ::Vec3 const &pos, bool randomizeDrop)
 
MCFOLD void $initializeContainerContents (::BlockSource &region)
 
virtual void eraseLootTable ()
 
MCAPI void setLootTable (::std::string const &lootTable, int lootTableSeed)
 
MCAPI void unPackLootTable (::Level &level, ::Container &container, ::DimensionType dimensionId, ::Actor *actor)
 
MCAPI void $eraseLootTable ()
 
LLAPI void refresh (optional_ref< class BlockSource > blockSource=std::nullopt)
 
virtual bool saveItemInstanceData (::CompoundTag &tag, ::SaveContext const &saveContext) const
 
virtual void saveBlockData (::CompoundTag &, ::BlockSource &) const
 
virtual void loadBlockData (::CompoundTag const &, ::BlockSource &, ::DataLoadHelper &)
 
virtual void onCustomTagLoadDone (::BlockSource &)
 
virtual void tick (::BlockSource &region)
 
virtual bool isMovable (::BlockSource &)
 
virtual bool isCustomNameSaved ()
 
virtual void onPlace (::BlockSource &)
 
virtual void onMove ()
 
virtual bool isPreserved (::BlockSource &) const
 
virtual bool shouldPreserve (::BlockSource &)
 
virtual void triggerEvent (int, int)
 
virtual void clearCache ()
 
virtual void onNeighborChanged (::BlockSource &, ::BlockPos const &)
 
virtual float getShadowRadius (::BlockSource &) const
 
virtual bool hasAlphaLayer () const
 
virtual::BlockActor * getCrackEntity (::BlockSource &, ::BlockPos const &)
 
virtual::AABB getCollisionShape (::IConstBlockSource const &) const
 
virtual void getDebugText (::std::vector<::std::string > &outputInfo, ::BlockPos const &debugPos)
 
virtual::Bedrock::Safety::RedactableString const & getCustomName () const
 
virtual::std::string const & getFilteredCustomName (::Bedrock::NotNullNonOwnerPtr<::ProfanityContext > const &context)
 
virtual::std::string getName () const
 
virtual void setCustomName (::Bedrock::Safety::RedactableString const &name)
 
virtual void setCustomName (::Bedrock::Safety::RedactableString const &name)
 
virtual::std::string getImmersiveReaderText (::BlockSource &)
 
virtual int getRepairCost () const
 
virtual::PistonBlockActor * getOwningPiston (::BlockSource &)
 
virtual::PistonBlockActor const * getOwningPiston (::BlockSource &) const
 
virtual::Container * getContainer ()
 
virtual::Container const * getContainer () const
 
virtual void onChunkLoaded (::LevelChunk &)
 
virtual void onChunkUnloaded (::LevelChunk &)
 
virtual void onSubChunkLoaded (::LevelChunk &, short, bool)
 
virtual ::std::vector<::std::string > getUgcStrings (::CompoundTag const &) const
 
virtual ::std::vector<::std::string > getFilteredUgcStrings (::CompoundTag const &) const
 
virtual void setUgcStrings (::CompoundTag &, ::std::vector<::std::string > const &) const
 
virtual void setFilteredUgcStrings (::CompoundTag &, ::std::vector<::std::string > const &) const
 
virtual void fixupOnLoad (::LevelChunk &)
 
virtual bool _playerCanUpdate (::Player const &) const
 
MCAPI bool onUpdatePacket (::CompoundTag const &data, ::BlockSource &region, ::Player const *fromPlayer)
 
MCAPI void * $ctor (::BlockActorType type, ::BlockPos const &pos, ::std::string const &)
 
MCAPI void * $ctor (::Container const &)
 
MCAPI void * $ctor (::SharedTypes::Legacy::ContainerType type)
 
MCAPI void * $ctor (::SharedTypes::Legacy::ContainerType type, ::std::string const &name, bool customName)
 
MCAPI bool $saveItemInstanceData (::CompoundTag &tag, ::SaveContext const &saveContext) const
 
MCFOLD void $saveBlockData (::CompoundTag &, ::BlockSource &) const
 
MCFOLD void $loadBlockData (::CompoundTag const &, ::BlockSource &, ::DataLoadHelper &)
 
MCFOLD void $onCustomTagLoadDone (::BlockSource &)
 
MCAPI void $tick (::BlockSource &region)
 
MCAPI bool $isMovable (::BlockSource &)
 
MCAPI bool $isCustomNameSaved ()
 
MCFOLD void $onPlace (::BlockSource &)
 
MCFOLD void $onMove ()
 
MCFOLD bool $isPreserved (::BlockSource &) const
 
MCFOLD bool $shouldPreserve (::BlockSource &)
 
MCFOLD void $triggerEvent (int, int)
 
MCFOLD void $clearCache ()
 
MCFOLD void $onNeighborChanged (::BlockSource &, ::BlockPos const &)
 
MCFOLD float $getShadowRadius (::BlockSource &) const
 
MCFOLD bool $hasAlphaLayer () const
 
MCFOLD::BlockActor * $getCrackEntity (::BlockSource &, ::BlockPos const &)
 
MCAPI::AABB $getCollisionShape (::IConstBlockSource const &) const
 
MCAPI void $getDebugText (::std::vector<::std::string > &outputInfo, ::BlockPos const &debugPos)
 
MCFOLD::Bedrock::Safety::RedactableString const & $getCustomName () const
 
MCAPI::std::string const & $getFilteredCustomName (::Bedrock::NotNullNonOwnerPtr<::ProfanityContext > const &context)
 
MCFOLD::std::string $getName () const
 
MCAPI void $setCustomName (::Bedrock::Safety::RedactableString const &name)
 
MCAPI void $setCustomName (::Bedrock::Safety::RedactableString const &name)
 
MCFOLD::std::string $getImmersiveReaderText (::BlockSource &)
 
MCAPI int $getRepairCost () const
 
MCFOLD::PistonBlockActor * $getOwningPiston (::BlockSource &)
 
MCFOLD::PistonBlockActor const * $getOwningPiston (::BlockSource &) const
 
MCFOLD::Container * $getContainer ()
 
MCFOLD::Container const * $getContainer () const
 
MCFOLD void $onChunkLoaded (::LevelChunk &)
 
MCFOLD void $onChunkUnloaded (::LevelChunk &)
 
MCFOLD void $onSubChunkLoaded (::LevelChunk &, short, bool)
 
MCFOLD ::std::vector<::std::string > $getUgcStrings (::CompoundTag const &) const
 
MCFOLD ::std::vector<::std::string > $getFilteredUgcStrings (::CompoundTag const &) const
 
MCFOLD void $setUgcStrings (::CompoundTag &, ::std::vector<::std::string > const &) const
 
MCFOLD void $setFilteredUgcStrings (::CompoundTag &, ::std::vector<::std::string > const &) const
 
MCFOLD void $fixupOnLoad (::LevelChunk &)
 
MCFOLD bool $_playerCanUpdate (::Player const &) const
 
std::string const & getTypeName () const
 
LLNDAPI optional_ref< ItemStackgetItemNonConst (int index)
 
ItemStackoperator[] (int index)
 
ItemStack const & operator[] (int index) const
 
constexpr Iterator begin () noexcept
 
constexpr ConstIterator cbegin () const noexcept
 
constexpr Iterator end () noexcept
 
constexpr ConstIterator cend () const noexcept
 
constexpr ReverseIterator rbegin () noexcept
 
constexpr ConstReverseIterator crbegin () const noexcept
 
constexpr ReverseIterator rend () noexcept
 
constexpr ConstReverseIterator crend () const noexcept
 
virtual void init ()
 
virtual void addContentChangeListener (::ContainerContentChangeListener *listener)
 
virtual void removeContentChangeListener (::ContainerContentChangeListener *listener)
 
virtual ::Bedrock::PubSub::Connector< void()> * getContainerRemovedConnector ()
 
virtual bool hasRemovedSubscribers () const
 
virtual bool hasRoomForItem (::ItemStack const &item)
 
virtual bool addItem (::ItemStack &item)
 
virtual bool addItemWithForceBalance (::ItemStack &item)
 
virtual bool addItemToFirstEmptySlot (::ItemStack const &item)
 
virtual void setItemWithForceBalance (int slot, ::ItemStack const &item, bool forceBalanced)
 
virtual void removeItem (int slot, int count)
 
virtual void removeAllItems ()
 
virtual void removeAllItemsWithForceBalance ()
 
virtual void containerRemoved ()
 
virtual ::std::vector<::ItemStackgetSlotCopies () const
 
virtual ::std::vector<::ItemStack const * > const getSlots () const
 
virtual int getEmptySlotsCount () const
 
virtual int getItemCount (::ItemStack const &compare) const
 
MCAPI int getItemCount (::std::function< bool(::ItemStack const &)> comparator)
 
virtual int findFirstSlotForItem (::ItemStack const &item) const
 
virtual bool canPushInItem (int, int, ::ItemStack const &) const
 
virtual bool canPullOutItem (int, int, ::ItemStack const &) const
 
virtual void setContainerMoved ()
 
virtual bool hasCustomName () const
 
virtual void readAdditionalSaveData (::CompoundTag const &tag)
 
virtual void addAdditionalSaveData (::CompoundTag &tag)
 
virtual void createTransactionContext (::std::function< void(::Container &, int, ::ItemStack const &, ::ItemStack const &)> callback, ::std::function< void()> execute)
 
virtual bool isEmpty () const
 
virtual bool isSlotDisabled (int) const
 
MCAPI void _dropSlotContent (::BlockSource &region, ::Random &random, ::Vec3 const &pos, bool randomizeDrop, int slot)
 
MCAPI void _serverInitId (int slot, ::ItemStack &item, ::std::function< void(int, ::ItemStack const &)> onNetIdChanged)
 
MCAPI int getRedstoneSignalFromContainer (::BlockSource &region)
 
MCAPI void removeCloseListener (::ContainerCloseListener *listener)
 
MCAPI void triggerTransactionChange (int slot, ::ItemStack const &oldItem, ::ItemStack const &newItem)
 
MCFOLD void $init ()
 
MCAPI void $addContentChangeListener (::ContainerContentChangeListener *listener)
 
MCAPI void $removeContentChangeListener (::ContainerContentChangeListener *listener)
 
MCFOLD ::Bedrock::PubSub::Connector< void()> * $getContainerRemovedConnector ()
 
MCAPI bool $hasRemovedSubscribers () const
 
MCAPI bool $hasRoomForItem (::ItemStack const &item)
 
MCAPI bool $addItem (::ItemStack &item)
 
MCAPI bool $addItemWithForceBalance (::ItemStack &item)
 
MCAPI bool $addItemToFirstEmptySlot (::ItemStack const &item)
 
MCFOLD void $setItemWithForceBalance (int slot, ::ItemStack const &item, bool forceBalanced)
 
MCAPI void $removeItem (int slot, int count)
 
MCAPI void $removeAllItems ()
 
MCAPI void $removeAllItemsWithForceBalance ()
 
MCAPI void $containerRemoved ()
 
MCAPI ::std::vector<::ItemStack$getSlotCopies () const
 
MCAPI ::std::vector<::ItemStack const * > const $getSlots () const
 
MCFOLD int $getEmptySlotsCount () const
 
MCAPI int $getItemCount (::ItemStack const &compare) const
 
MCAPI int $findFirstSlotForItem (::ItemStack const &item) const
 
MCFOLD bool $canPushInItem (int, int, ::ItemStack const &) const
 
MCFOLD bool $canPullOutItem (int, int, ::ItemStack const &) const
 
MCAPI void $setContainerMoved ()
 
MCAPI bool $hasCustomName () const
 
MCAPI void $readAdditionalSaveData (::CompoundTag const &tag)
 
MCAPI void $addAdditionalSaveData (::CompoundTag &tag)
 
MCAPI void $createTransactionContext (::std::function< void(::Container &, int, ::ItemStack const &, ::ItemStack const &)> callback, ::std::function< void()> execute)
 
MCAPI bool $isEmpty () const
 
MCFOLD bool $isSlotDisabled (int) const
 

Static Public Member Functions

static MCAPI ::std::string getLootTableFromVariant (::BrushableBlockActor::Placement state)
 
static MCAPI void ** $vftableForContainer ()
 
static MCAPI void ** $vftableForRandomizableBlockActorContainerBase ()
 
static MCAPI void ** $vftable ()
 
static MCAPI void ** $vftable ()
 
static LLNDAPI std::shared_ptr< BlockActorcreate (class CompoundTag const &nbt)
 
static LLNDAPI std::shared_ptr< BlockActorcreate (class CompoundTag const &nbt, class BlockPos const &pos)
 
static MCAPI ::std::map<::std::string, ::BlockActorType > _createIdClassMap ()
 
static MCAPI ::std::shared_ptr<::BlockActorloadStatic (::ILevel &level, ::CompoundTag const &tag, ::DataLoadHelper &dataLoadHelper)
 
static MCAPI ::std::map<::BlockActorType, ::std::string > const & mClassIdMap ()
 
static MCAPI ::std::map<::std::string, ::BlockActorType > const & mIdClassMap ()
 
static MCAPI ::SharedTypes::Legacy::ContainerType getContainerTypeId (::std::string const &name)
 
static MCAPI ::BidirectionalUnorderedMap<::SharedTypes::Legacy::ContainerType, ::std::string > const & containerTypeMap ()
 

Public Attributes

::ll::TypedStorage< 8, 24, ::std::optional<::ExpiringTick > > mBrushReset
 
::ll::TypedStorage< 8, 24, ::std::optional<::ExpiringTick > > mBrushCooldown
 
::ll::TypedStorage< 8, 24, ::WeakEntityRefmDisplayEntity
 
::ll::TypedStorage< 8, 24, ::std::vector<::ItemStack > > mItems
 
::ll::TypedStorage< 8, 48, ::HashedStringmBlockId
 
::ll::TypedStorage< 4, 4, uint > mBrushCount
 
::ll::TypedStorage< 1, 1, uchar > mBrushDirection
 
::ll::TypedStorage< 1, 1, bool > mLootTableUnpacked
 
::ll::UntypedStorage< 8, 32 > mUnk4eae51
 
::ll::UntypedStorage< 4, 4 > mUnk7a2f42
 
::ll::TypedStorage< 4, 4, int > mTickCount
 
::ll::TypedStorage< 8, 8, ::Block const * > mBlock
 
::ll::TypedStorage< 4, 4, float > mDestroyTimer
 
::ll::TypedStorage< 4, 12, ::Vec3mDestroyDirection
 
::ll::TypedStorage< 4, 4, float > mDestroyProgress
 
::ll::TypedStorage< 4, 12, ::BlockPosmPosition
 
::ll::TypedStorage< 4, 24, ::AABBmBB
 
::ll::TypedStorage< 4, 4, ::BlockActorType const > mType
 
::ll::TypedStorage< 4, 4, ::BlockActorRendererId > mRendererId
 
::ll::TypedStorage< 8, 72, ::Bedrock::Safety::RedactableStringmCustomName
 
bool mCustomName
 
::ll::TypedStorage< 8, 32, ::std::string > mFilteredCustomName
 
::ll::TypedStorage< 4, 4, int > mRepairCost
 
::ll::TypedStorage< 1, 1, bool > mClientSideOnly
 
::ll::TypedStorage< 1, 1, bool > mIsMovable
 
::ll::TypedStorage< 1, 1, bool > mSaveCustomName
 
::ll::TypedStorage< 1, 1, bool > mCanRenderCustomName
 
::ll::TypedStorage< 4, 4, float const > signShadowRadius
 
::ll::TypedStorage< 8, 24, ::ActorTerrainInterlockDatamTerrainInterlockData
 
::ll::TypedStorage< 1, 1, bool > mChanged
 
::SharedTypes::Legacy::ContainerType mContainerType
 
::SharedTypes::Legacy::ContainerType mGameplayContainerType
 
::std::unordered_set<::ContainerContentChangeListener * > mContentChangeListeners
 
::std::unordered_set<::ContainerSizeChangeListener * > mSizeChangeListeners
 
::std::unordered_set<::ContainerCloseListener * > mCloseListeners
 
::Container::PublisherWrapper mRemovedPublisher
 
::std::deque< TransactionContextmTransactionContextStack
 
::Bedrock::Safety::RedactableString mName
 
::ContainerOwner mContainerOwner
 
::ContainerRuntimeId mContainerRuntimeId
 

Member Function Documentation

◆ serverInitItemStackIds()

virtual void BrushableBlockActor::serverInitItemStackIds ( int containerSlot,
int count,
::std::function< void(int, ::ItemStack const &)> onNetIdChanged )
virtual

Implements Container.

◆ getContainerSize()

virtual int BrushableBlockActor::getContainerSize ( ) const
virtual

Implements Container.

◆ getMaxStackSize()

virtual int BrushableBlockActor::getMaxStackSize ( ) const
virtual

Implements Container.

◆ getItem()

virtual::ItemStack const & BrushableBlockActor::getItem ( int slot) const
virtual

Implements Container.

◆ setItem()

virtual void BrushableBlockActor::setItem ( int slot,
::ItemStack const & item )
virtual

Implements Container.

◆ stopOpen()

virtual void BrushableBlockActor::stopOpen ( ::Player & player)
virtual

Reimplemented from Container.

◆ onChanged()

virtual void BrushableBlockActor::onChanged ( ::BlockSource & region)
virtual

Reimplemented from BlockActor.

◆ onRemoved()

virtual void BrushableBlockActor::onRemoved ( ::BlockSource & region)
virtual

Reimplemented from RandomizableBlockActorContainer.

◆ load()

virtual void BrushableBlockActor::load ( ::ILevel & level,
::CompoundTag const & tag,
::DataLoadHelper & dataLoadHelper )
virtual

◆ save()

virtual bool BrushableBlockActor::save ( ::CompoundTag & tag,
::SaveContext const & saveContext ) const
virtual

◆ _onUpdatePacket()

virtual void BrushableBlockActor::_onUpdatePacket ( ::CompoundTag const & data,
::BlockSource & region )
virtual

Reimplemented from BlockActor.

◆ setContainerChanged()

virtual void RandomizableBlockActorContainer::setContainerChanged ( int slot)
virtualinherited

Reimplemented from Container.

◆ startOpen()

virtual void RandomizableBlockActorContainer::startOpen ( ::Player & player)
virtualinherited

Implements Container.

◆ dropSlotContent()

virtual void RandomizableBlockActorContainer::dropSlotContent ( ::BlockSource & region,
::Vec3 const & pos,
bool randomizeDrop,
int slot )
virtualinherited

Reimplemented from Container.

◆ dropContents()

virtual void RandomizableBlockActorContainer::dropContents ( ::BlockSource & region,
::Vec3 const & pos,
bool randomizeDrop )
virtualinherited

Reimplemented from Container.

◆ initializeContainerContents()

virtual void RandomizableBlockActorContainer::initializeContainerContents ( ::BlockSource & region)
virtualinherited

Reimplemented from Container.

◆ eraseLootTable()

virtual void RandomizableBlockActorContainerBase::eraseLootTable ( )
virtualinherited

Reimplemented from BlockActor.


The documentation for this class was generated from the following file: