41 MinecraftGameTestHelper& operator=(MinecraftGameTestHelper
const&);
42 MinecraftGameTestHelper(MinecraftGameTestHelper
const&);
43 MinecraftGameTestHelper();
48 virtual ~MinecraftGameTestHelper() =
default;
50 virtual void succeedWhenEntityPresent(
58 virtual void succeedWhenEntityPresent(
64 virtual void succeedWhenEntityData(
67 ::std::function<
bool(
::Actor&)> dataPredicate
70 virtual void succeedWhenEntityHasComponent(
72 ::std::string
const& componentName,
77 virtual void succeedWhenBlockPresent(
::Block const& block,
int x,
int y,
int z,
bool isPresent) ;
79 virtual void succeedWhenBlockPresent(
::Block const& block,
::BlockPos const& pos,
bool isPresent) ;
84 virtual void setNight() ;
86 virtual void setDayTime(
int time) ;
88 virtual ::std::optional<::gametest::GameTestError>
89 setBlock(
int x,
int y,
int z,
::Block const& block,
int updateFlags) ;
91 virtual ::std::optional<::gametest::GameTestError>
94 virtual ::std::optional<::gametest::GameTestError>
95 destroyBlock(
::BlockPos const& pos,
bool dropResources) ;
97 virtual ::std::optional<::gametest::GameTestError> pressButton(
int x,
int y,
int z) ;
99 virtual ::std::optional<::gametest::GameTestError> pressButton(
::BlockPos const& buttonPos) ;
101 virtual ::std::optional<::gametest::GameTestError> pullLever(
int x,
int y,
int z) ;
103 virtual ::std::optional<::gametest::GameTestError> pullLever(
::BlockPos const& leverPos) ;
105 virtual ::std::optional<::gametest::GameTestError> killAllEntities() ;
107 virtual ::std::variant<::gametest::GameTestError, ::Actor*>
110 virtual ::std::variant<::gametest::GameTestError, ::Actor*>
113 virtual ::std::variant<::gametest::GameTestError, ::Actor*>
116 virtual ::std::variant<::gametest::GameTestError, ::Actor*>
119 virtual ::std::variant<::gametest::GameTestError, ::Actor*>
122 virtual ::std::variant<::gametest::GameTestError, ::Actor*>
125 virtual ::std::optional<::gametest::GameTestError>
128 virtual ::std::optional<::gametest::GameTestError>
129 walkTo(
::Mob& mob,
::Vec3 const& pos,
float speedModifier) ;
131 virtual ::std::optional<::gametest::GameTestError> setTntFuse(
::Actor& actor,
int fuseLength) ;
133 virtual ::std::optional<::gametest::GameTestError>
136 virtual ::std::optional<::gametest::GameTestError> assertEntityPresent(
144 virtual ::std::optional<::gametest::GameTestError> assertEntityPresent(
150 virtual ::std::optional<::gametest::GameTestError> assertEntityPresent(
153 float const distance,
157 virtual ::std::optional<::gametest::GameTestError>
158 assertEntityInstancePresent(
::Actor const* actor,
::BlockPos const& pos,
bool expectedPresent) ;
160 virtual ::std::optional<::gametest::GameTestError>
161 assertEntityInstancePresent(
::Actor const* actor,
bool expectedPresent)
const ;
163 virtual ::std::optional<::gametest::GameTestError> assertEntityTouching(
169 virtual ::std::optional<::gametest::GameTestError> assertEntityState(
172 ::std::function<
bool(
::Actor&)> dataPredicate
175 virtual ::std::optional<::gametest::GameTestError>
176 assertBlockPresent(
::BlockType const& blockType,
int x,
int y,
int z,
bool isPresent) ;
178 virtual ::std::optional<::gametest::GameTestError>
181 virtual ::std::optional<::gametest::GameTestError>
182 assertBlockState(
::BlockPos const& blockPos, ::std::function<
bool(
::Block const&)> predicate) ;
184 virtual ::std::optional<::gametest::GameTestError>
185 assertItemEntityPresent(
::Item const& item,
int x,
int y,
int z,
float searchDistance,
bool isPresent) ;
187 virtual ::std::optional<::gametest::GameTestError> assertItemEntityPresent(
190 float searchDistance,
194 virtual ::std::optional<::gametest::GameTestError> assertItemEntityCountIs(
197 float searchDistance,
201 virtual ::std::optional<::gametest::GameTestError> assertContainerEmpty(
::BlockPos const& pos) ;
203 virtual ::std::optional<::gametest::GameTestError>
206 virtual ::std::optional<::gametest::GameTestError> assertEntityHasComponent(
208 ::std::string
const& componentName,
213 virtual ::std::optional<::gametest::GameTestError> assertEntityHasArmor(
215 ::SharedTypes::Legacy::ArmorSlot armorSlot,
216 ::std::string
const& armorName,
222 virtual ::std::optional<::gametest::GameTestError> print(::std::string
const& text) ;
224 virtual ::std::optional<::gametest::GameTestError>
225 assertRedstonePower(
::BlockPos const& pos,
int expectedPower) ;
227 virtual ::std::optional<::gametest::GameTestError>
228 assertIsWaterlogged(
::BlockPos const& pos,
bool expectedWaterlogged) ;
230 virtual ::std::optional<::gametest::GameTestError> pulseRedstone(
::BlockPos const& pos,
int duration) ;
232 virtual ::std::variant<::gametest::GameTestError, ::ScriptModuleGameTest::ScriptGameTestConnectivity>
233 getFenceConnectivity(
::BlockPos const& relativePos) ;
235 virtual ::std::optional<::gametest::GameTestError>
236 setFluidContainer(
::BlockPos const& pos,
int _fluidType) ;
238 virtual ::std::optional<::gametest::GameTestError> triggerInternalBlockEvent(
240 ::std::string
const& event,
241 ::std::vector<float>
const& parameters
244 virtual ::std::variant<::gametest::GameTestError, ::BlockPos> worldPosition(
::BlockPos const& relativePos)
const
247 virtual ::std::variant<::gametest::GameTestError, ::Vec3> worldPosition(
::Vec3 const& relativePos)
const
250 virtual ::std::variant<::gametest::GameTestError, ::BlockPos> relativePosition(
::BlockPos const& worldPos)
const
253 virtual ::std::variant<::gametest::GameTestError, ::Vec3> relativePosition(
::Vec3 const& worldPos)
const
256 virtual ::std::optional<::gametest::GameTestError>
257 assertCanReachLocation(
::Mob& mob,
::BlockPos const& pos,
bool expectedReach) ;
259 virtual ::std::optional<::gametest::GameTestError> spreadFromFaceTowardDirection(
261 ::ScriptModuleMinecraft::ScriptFacing fromFace,
262 ::ScriptModuleMinecraft::ScriptFacing direction
265 virtual ::std::optional<::gametest::GameTestError> getBlockSource(
::BlockSource*& blockSourceResult) ;
267 virtual ::std::variant<::gametest::GameTestError, ::SimulatedPlayer*>
268 spawnSimulatedPlayer(::std::string
const& name,
::BlockPos const& pos, ::GameType gameMode) ;
272 virtual ::std::variant<::gametest::GameTestError, ::Dimension*> getDimension() ;
274 virtual ::std::optional<::gametest::GameTestError> onPlayerJump(
::Mob& mob,
int jumpAmount) ;
280 MCAPI ::std::optional<::gametest::GameTestError> _assertEntityInstancePresent(
282 ::AABB const& searchBounds,
287 MCAPI ::std::optional<::gametest::GameTestError> _assertEntityPresent(
289 ::AABB const& searchBounds,
294 MCAPI
int _getItemEntityCount(
::Item const& item,
::AABB const& searchBounds);
296 MCAPI ::Bedrock::NotNullNonOwnerPtr<::ServerNetworkHandler> _getServerNetworkHandler()
const;
298 MCAPI ::std::optional<::gametest::GameTestError> _getStructureBlockMissingError()
const;
307 MCAPI
void $succeedWhenEntityPresent(
313 MCAPI
void $succeedWhenEntityData(
316 ::std::function<
bool(
::Actor&)> dataPredicate
319 MCAPI
void $succeedWhenEntityHasComponent(
321 ::std::string
const& componentName,
326 MCAPI
void $succeedWhenBlockPresent(
::Block const& block,
int x,
int y,
int z,
bool isPresent);
328 MCAPI
void $succeedWhenBlockPresent(
::Block const& block,
::BlockPos const& pos,
bool isPresent);
330 MCAPI
void $succeedWhenBlockPresent(
::BlockType const& block,
::BlockPos const& position,
bool isPresent);
332 MCAPI
void $setNight();
334 MCAPI
void $setDayTime(
int time);
336 MCAPI ::std::optional<::gametest::GameTestError>
337 $setBlock(
int x,
int y,
int z,
::Block const& block,
int updateFlags);
339 MCAPI ::std::optional<::gametest::GameTestError>
342 MCAPI ::std::optional<::gametest::GameTestError> $destroyBlock(
::BlockPos const& pos,
bool dropResources);
344 MCAPI ::std::optional<::gametest::GameTestError> $pressButton(
int x,
int y,
int z);
346 MCAPI ::std::optional<::gametest::GameTestError> $pressButton(
::BlockPos const& buttonPos);
348 MCAPI ::std::optional<::gametest::GameTestError> $pullLever(
int x,
int y,
int z);
350 MCAPI ::std::optional<::gametest::GameTestError> $pullLever(
::BlockPos const& leverPos);
352 MCAPI ::std::optional<::gametest::GameTestError> $killAllEntities();
354 MCAPI ::std::variant<::gametest::GameTestError, ::Actor*>
357 MCAPI ::std::variant<::gametest::GameTestError, ::Actor*>
360 MCAPI ::std::variant<::gametest::GameTestError, ::Actor*>
363 MCAPI ::std::variant<::gametest::GameTestError, ::Actor*>
366 MCAPI ::std::variant<::gametest::GameTestError, ::Actor*>
369 MCAPI ::std::variant<::gametest::GameTestError, ::Actor*>
372 MCAPI ::std::optional<::gametest::GameTestError> $walkTo(
::Mob& mob,
::BlockPos const& pos,
float speedModifier);
374 MCAPI ::std::optional<::gametest::GameTestError> $walkTo(
::Mob& mob,
::Vec3 const& pos,
float speedModifier);
376 MCAPI ::std::optional<::gametest::GameTestError> $setTntFuse(
::Actor& actor,
int fuseLength);
378 MCAPI ::std::optional<::gametest::GameTestError>
381 MCAPI ::std::optional<::gametest::GameTestError>
384 MCAPI ::std::optional<::gametest::GameTestError>
387 MCAPI ::std::optional<::gametest::GameTestError> $assertEntityPresent(
390 float const distance,
394 MCAPI ::std::optional<::gametest::GameTestError>
395 $assertEntityInstancePresent(
::Actor const* actor,
::BlockPos const& pos,
bool expectedPresent);
397 MCAPI ::std::optional<::gametest::GameTestError>
398 $assertEntityInstancePresent(
::Actor const* actor,
bool expectedPresent)
const;
400 MCAPI ::std::optional<::gametest::GameTestError>
403 MCAPI ::std::optional<::gametest::GameTestError> $assertEntityState(
406 ::std::function<
bool(
::Actor&)> dataPredicate
409 MCAPI ::std::optional<::gametest::GameTestError>
410 $assertBlockPresent(
::BlockType const& blockType,
int x,
int y,
int z,
bool isPresent);
412 MCAPI ::std::optional<::gametest::GameTestError>
415 MCAPI ::std::optional<::gametest::GameTestError>
416 $assertBlockState(
::BlockPos const& blockPos, ::std::function<
bool(
::Block const&)> predicate);
418 MCAPI ::std::optional<::gametest::GameTestError>
419 $assertItemEntityPresent(
::Item const& item,
int x,
int y,
int z,
float searchDistance,
bool isPresent);
421 MCAPI ::std::optional<::gametest::GameTestError>
422 $assertItemEntityPresent(
::Item const& item,
::BlockPos const& pos,
float searchDistance,
bool isPresent);
424 MCAPI ::std::optional<::gametest::GameTestError>
425 $assertItemEntityCountIs(
::Item const& itemType,
::BlockPos const& pos,
float searchDistance,
int expectedCount);
427 MCAPI ::std::optional<::gametest::GameTestError> $assertContainerEmpty(
::BlockPos const& pos);
429 MCAPI ::std::optional<::gametest::GameTestError>
432 MCAPI ::std::optional<::gametest::GameTestError> $assertEntityHasComponent(
434 ::std::string
const& componentName,
439 MCAPI ::std::optional<::gametest::GameTestError> $assertEntityHasArmor(
441 ::SharedTypes::Legacy::ArmorSlot armorSlot,
442 ::std::string
const& armorName,
448 MCAPI ::std::optional<::gametest::GameTestError> $print(::std::string
const& text);
450 MCAPI ::std::optional<::gametest::GameTestError> $assertRedstonePower(
::BlockPos const& pos,
int expectedPower);
452 MCAPI ::std::optional<::gametest::GameTestError>
453 $assertIsWaterlogged(
::BlockPos const& pos,
bool expectedWaterlogged);
455 MCAPI ::std::optional<::gametest::GameTestError> $pulseRedstone(
::BlockPos const& pos,
int duration);
457 MCAPI ::std::variant<::gametest::GameTestError, ::ScriptModuleGameTest::ScriptGameTestConnectivity>
458 $getFenceConnectivity(
::BlockPos const& relativePos);
460 MCAPI ::std::optional<::gametest::GameTestError> $setFluidContainer(
::BlockPos const& pos,
int _fluidType);
462 MCAPI ::std::optional<::gametest::GameTestError> $triggerInternalBlockEvent(
464 ::std::string
const& event,
465 ::std::vector<float>
const& parameters
468 MCAPI ::std::variant<::gametest::GameTestError, ::BlockPos> $worldPosition(
::BlockPos const& relativePos)
const;
470 MCAPI ::std::variant<::gametest::GameTestError, ::Vec3> $worldPosition(
::Vec3 const& relativePos)
const;
472 MCAPI ::std::variant<::gametest::GameTestError, ::BlockPos> $relativePosition(
::BlockPos const& worldPos)
const;
474 MCAPI ::std::variant<::gametest::GameTestError, ::Vec3> $relativePosition(
::Vec3 const& worldPos)
const;
476 MCAPI ::std::optional<::gametest::GameTestError>
477 $assertCanReachLocation(
::Mob& mob,
::BlockPos const& pos,
bool expectedReach);
479 MCAPI ::std::optional<::gametest::GameTestError> $spreadFromFaceTowardDirection(
481 ::ScriptModuleMinecraft::ScriptFacing fromFace,
482 ::ScriptModuleMinecraft::ScriptFacing direction
485 MCAPI ::std::optional<::gametest::GameTestError> $getBlockSource(
::BlockSource*& blockSourceResult);
487 MCAPI ::std::variant<::gametest::GameTestError, ::SimulatedPlayer*>
488 $spawnSimulatedPlayer(::std::string
const& name,
::BlockPos const& pos, ::GameType gameMode);
492 MCAPI ::std::variant<::gametest::GameTestError, ::Dimension*> $getDimension();
494 MCAPI ::std::optional<::gametest::GameTestError> $onPlayerJump(
::Mob& mob,
int jumpAmount);