50 create(std::string
const& name,
Vec3 const& pos,
DimensionType dimId = 0,
Vec2 const& rotation = {0, 0});
52 [[nodiscard]]
inline bool simulateSneaking() {
54 return SynchedActorDataAccess::getActorFlag(getEntityContext(), ActorFlags::Sneaking);
56 [[nodiscard]]
inline bool simulateStopSneaking() {
58 return !SynchedActorDataAccess::getActorFlag(getEntityContext(), ActorFlags::Sneaking);
60 inline bool simulateUseItem() {
return simulateUseItemInSlot(getSelectedItemSlot()); }
62 LLAPI
bool simulateDestroyBlock(
BlockPos const&, ScriptModuleMinecraft::ScriptFacing);
64 LLAPI
bool simulateDestroyLookAt(
float handLength = 5.5f);
66 LLAPI static ::SimulatedPlayer* tryGetFromEntity(
::EntityContext& entity,
bool includeRemoved);
71 ::ll::TypedStorage<8, 48, ::sim::MovementIntent> mSimulatedMovement;
72 ::ll::TypedStorage<1, 2, ::sim::BuildIntent> mBuildIntention;
73 ::ll::TypedStorage<8, 40, ::sim::LookAtIntent> mLookAtIntent;
74 ::ll::TypedStorage<4, 16, ::std::optional<::BlockPos>> mDestroyingBlockPos;
75 ::ll::TypedStorage<1, 2, ::std::optional<uchar>> mDestroyingBlockFace;
76 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::gametest::BaseGameTestHelper>> mGameTestHelper;
77 ::ll::TypedStorage<8, 8, uint64> mCooldownTick;
78 ::ll::TypedStorage<8, 80, ::PlayerMovementSettings> mMovementSettings;
79 ::ll::TypedStorage<4, 4, float> mBaseInputSpeed;
80 ::ll::TypedStorage<8, 32, ::std::string> mXuid;
81 ::ll::TypedStorage<8, 40, ::PlayerSuspendLevelStorageSaveToken const> mPlayerSuspendLevelStorageSaveToken;
92 virtual void aiStep() ;
95 virtual bool isSimulated()
const ;
98 virtual ::std::string getXuid()
const ;
101 virtual ::PlayerMovementSettings
const& getMovementSettings()
const ;
104 virtual void teleportTo(
106 bool shouldStopRiding,
108 int sourceEntityType,
113 virtual int _getSpawnChunkLimit()
const ;
116 virtual ::std::shared_ptr<::ChunkViewSource> _createChunkSource(
::ChunkSource& mainChunkSource) ;
119 virtual void _updateChunkPublisherView(
::Vec3 const& position,
float minDistance) ;
133 ::GameType playerGameType,
138 ::std::string
const& token,
140 int enableItemStackNetManager,
145 MCAPI
void _addMoveComponent();
147 MCAPI ::ScriptModuleGameTest::ScriptNavigationResult _createNavigationResult(
::NavigationComponent* navigation
150 MCFOLD ::BlockSource& _getRegion();
152 MCAPI
bool _trySwing();
154 MCAPI
void _updateRidingComponents();
156 MCAPI
void preAiStep();
160 MCAPI
bool simulateAttack();
162 MCAPI
void simulateChat(::std::string
const& message);
164 MCAPI
bool simulateInteract();
166 MCAPI
bool simulateInteract(
::BlockPos const& pos, ::ScriptModuleMinecraft::ScriptFacing face);
168 MCAPI
bool simulateJump();
170 MCAPI
void simulateLocalMove(
::Vec3 const& localDirection,
float);
172 MCAPI
void simulateMoveToLocation(
::Vec3 const& position,
float speed,
bool faceTarget);
174 MCAPI ::ScriptModuleGameTest::ScriptNavigationResult simulateNavigateToEntity(
::Actor& actor,
float speed);
176 MCAPI ::ScriptModuleGameTest::ScriptNavigationResult
177 simulateNavigateToLocation(
::Vec3 const& position,
float speed);
179 MCAPI
void simulateNavigateToLocations(::std::vector<::Vec3>&& positions,
float speed);
181 MCAPI
void simulateSetBodyRotation(
float degY);
183 MCAPI
void simulateStopDestroyingBlock();
185 MCAPI
bool simulateUseItemInSlot(
int slot);
187 MCAPI
bool simulateUseItemOnBlock(
190 ::ScriptModuleMinecraft::ScriptFacing face,
194 MCAPI
void simulateWorldMove(
::Vec3 const& worldDirection,
float);
200 MCAPI static ::SimulatedPlayer* create(
201 ::std::string
const& name,
204 ::Bedrock::NotNullNonOwnerPtr<::ServerNetworkHandler> serverNetworkHandler,
205 ::std::string
const& xuid
217 ::GameType playerGameType,
222 ::std::string
const& token,
224 int enableItemStackNetManager,
239 MCAPI
void $initializeComponents(::ActorInitializationMethod method,
::VariantParameterList const& params);
241 MCAPI
void $aiStep();
243 MCFOLD
bool $isSimulated()
const;
245 MCAPI ::std::string $getXuid()
const;
247 MCAPI ::PlayerMovementSettings
const& $getMovementSettings()
const;
250 $teleportTo(
::Vec3 const& pos,
bool shouldStopRiding,
int cause,
int sourceEntityType,
bool keepVelocity);
252 MCFOLD
int $_getSpawnChunkLimit()
const;
254 MCAPI ::std::shared_ptr<::ChunkViewSource> $_createChunkSource(
::ChunkSource& mainChunkSource);
256 MCFOLD
void $_updateChunkPublisherView(
::Vec3 const& position,
float minDistance);
262 MCAPI
static void** $vftable();
Definition EntityContext.h:16