LeviLamina
Loading...
Searching...
No Matches
HomeComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/common/WeakPtr.h"
7#include "mc/entity/components_json_legacy/RestrictionType.h"
8#include "mc/world/level/BlockPos.h"
9#include "mc/world/level/dimension/DimensionType.h"
10
11// auto generated forward declare list
12// clang-format off
13class Actor;
14class BlockSource;
15class BlockType;
16class CompoundTag;
17class DataLoadHelper;
18// clang-format on
19
20class HomeComponent {
21public:
22 // member variables
23 // NOLINTBEGIN
24 ::ll::TypedStorage<4, 4, ::RestrictionType> mRestrictionType;
25 ::ll::TypedStorage<4, 4, int> mRestrictionRadius;
26 ::ll::TypedStorage<4, 4, int> mRestrictionRadiusSqr;
27 ::ll::TypedStorage<4, 4, int> mCooldownTicksMax;
28 ::ll::TypedStorage<4, 4, int> mCooldownTicks;
29 ::ll::TypedStorage<8, 24, ::std::vector<::WeakPtr<::BlockType const>>> mHomeBlocks;
30 ::ll::TypedStorage<4, 12, ::BlockPos> mHomePos;
31 ::ll::TypedStorage<4, 4, ::DimensionType> mDimensionId;
32 // NOLINTEND
33
34public:
35 // member functions
36 // NOLINTBEGIN
37 MCAPI HomeComponent();
38
39 MCAPI void addAdditionalSaveData(::CompoundTag& tag) const;
40
41 MCFOLD ::BlockPos getHomePos() const;
42
43 MCFOLD int getRestrictionRadius() const;
44
45 MCFOLD int getRestrictionRadiusSqr() const;
46
47 MCFOLD bool hasAnyRestriction() const;
48
49 MCFOLD bool hasSpecificRestriction(::RestrictionType restrictionType) const;
50
51 MCAPI bool hasValidBlockAtHomePos(::BlockSource const& region) const;
52
53 MCAPI bool hasValidHomePos() const;
54
55 MCAPI bool isInHomeDimension(::Actor const& owner) const;
56
57 MCAPI bool isWithinRestriction(::BlockPos const& pos) const;
58
59 MCAPI void readAdditionalSaveData(::Actor&, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
60
61 MCAPI void setHome(::BlockPos const& pos, ::DimensionType const& id);
62
63 MCAPI void tick(::Actor& owner);
64 // NOLINTEND
65
66public:
67 // constructor thunks
68 // NOLINTBEGIN
69 MCAPI void* $ctor();
70 // NOLINTEND
71};
Definition Actor.h:125
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition BlockType.h:84
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition DimensionType.h:5