51 virtual void succeedWhenEntityPresent(
60 virtual void succeedWhenEntityPresent(
67 virtual void succeedWhenEntityData(
70 ::std::function<
bool(
::Actor&)> dataPredicate
74 virtual void succeedWhenEntityHasComponent(
76 ::std::string
const& componentName,
82 virtual void succeedWhenBlockPresent(
::Block const& block,
int x,
int y,
int z,
bool isPresent) ;
85 virtual void succeedWhenBlockPresent(
::Block const& block,
::BlockPos const& pos,
bool isPresent) ;
92 virtual void setNight() ;
95 virtual void setDayTime(
int time) ;
98 virtual ::std::optional<::gametest::GameTestError>
99 setBlock(
int x,
int y,
int z,
::Block const& block,
int updateFlags) ;
102 virtual ::std::optional<::gametest::GameTestError>
106 virtual ::std::optional<::gametest::GameTestError>
107 destroyBlock(
::BlockPos const& pos,
bool dropResources) ;
110 virtual ::std::optional<::gametest::GameTestError> pressButton(
int x,
int y,
int z) ;
113 virtual ::std::optional<::gametest::GameTestError> pressButton(
::BlockPos const& buttonPos) ;
116 virtual ::std::optional<::gametest::GameTestError> pullLever(
int x,
int y,
int z) ;
119 virtual ::std::optional<::gametest::GameTestError> pullLever(
::BlockPos const& leverPos) ;
122 virtual ::std::optional<::gametest::GameTestError> killAllEntities() ;
125 virtual ::std::variant<::gametest::GameTestError, ::Actor*>
129 virtual ::std::variant<::gametest::GameTestError, ::Actor*>
133 virtual ::std::variant<::gametest::GameTestError, ::Actor*>
137 virtual ::std::variant<::gametest::GameTestError, ::Actor*>
141 virtual ::std::variant<::gametest::GameTestError, ::Actor*>
145 virtual ::std::variant<::gametest::GameTestError, ::Actor*>
149 virtual ::std::optional<::gametest::GameTestError>
153 virtual ::std::optional<::gametest::GameTestError>
154 walkTo(
::Mob& mob,
::Vec3 const& pos,
float speedModifier) ;
157 virtual ::std::optional<::gametest::GameTestError> setTntFuse(
::Actor& actor,
int fuseLength) ;
160 virtual ::std::optional<::gametest::GameTestError>
164 virtual ::std::optional<::gametest::GameTestError> assertEntityPresent(
173 virtual ::std::optional<::gametest::GameTestError> assertEntityPresent(
180 virtual ::std::optional<::gametest::GameTestError> assertEntityPresent(
183 float const distance,
188 virtual ::std::optional<::gametest::GameTestError>
189 assertEntityInstancePresent(
::Actor const* actor,
::BlockPos const& pos,
bool expectedPresent) ;
192 virtual ::std::optional<::gametest::GameTestError>
193 assertEntityInstancePresent(
::Actor const* actor,
bool expectedPresent)
const ;
196 virtual ::std::optional<::gametest::GameTestError> assertEntityTouching(
203 virtual ::std::optional<::gametest::GameTestError> assertEntityState(
206 ::std::function<
bool(
::Actor&)> dataPredicate
210 virtual ::std::optional<::gametest::GameTestError>
211 assertBlockPresent(
::BlockLegacy const& blockType,
int x,
int y,
int z,
bool isPresent) ;
214 virtual ::std::optional<::gametest::GameTestError>
218 virtual ::std::optional<::gametest::GameTestError>
219 assertBlockState(
::BlockPos const& blockPos, ::std::function<
bool(
::Block const&)> predicate) ;
222 virtual ::std::optional<::gametest::GameTestError>
223 assertItemEntityPresent(
::Item const& item,
int x,
int y,
int z,
float searchDistance,
bool isPresent) ;
226 virtual ::std::optional<::gametest::GameTestError> assertItemEntityPresent(
229 float searchDistance,
234 virtual ::std::optional<::gametest::GameTestError> assertItemEntityCountIs(
237 float searchDistance,
242 virtual ::std::optional<::gametest::GameTestError> assertContainerEmpty(
::BlockPos const& pos) ;
245 virtual ::std::optional<::gametest::GameTestError>
249 virtual ::std::optional<::gametest::GameTestError> assertEntityHasComponent(
251 ::std::string
const& componentName,
257 virtual ::std::optional<::gametest::GameTestError> assertEntityHasArmor(
259 ::SharedTypes::Legacy::ArmorSlot armorSlot,
260 ::std::string
const& armorName,
267 virtual ::std::optional<::gametest::GameTestError> print(::std::string
const& text) ;
270 virtual ::std::optional<::gametest::GameTestError>
271 assertRedstonePower(
::BlockPos const& pos,
int expectedPower) ;
274 virtual ::std::optional<::gametest::GameTestError>
275 assertIsWaterlogged(
::BlockPos const& pos,
bool expectedWaterlogged) ;
278 virtual ::std::optional<::gametest::GameTestError> pulseRedstone(
::BlockPos const& pos,
int duration) ;
281 virtual ::std::variant<::gametest::GameTestError, ::ScriptModuleGameTest::ScriptGameTestConnectivity>
282 getFenceConnectivity(
::BlockPos const& relativePos) ;
285 virtual ::std::optional<::gametest::GameTestError>
286 setFluidContainer(
::BlockPos const& pos,
int _fluidType) ;
289 virtual ::std::optional<::gametest::GameTestError> triggerInternalBlockEvent(
291 ::std::string
const& event,
292 ::std::vector<float>
const& parameters
296 virtual ::std::variant<::gametest::GameTestError, ::BlockPos> worldPosition(
::BlockPos const& relativePos)
const
300 virtual ::std::variant<::gametest::GameTestError, ::Vec3> worldPosition(
::Vec3 const& relativePos)
const
304 virtual ::std::variant<::gametest::GameTestError, ::BlockPos> relativePosition(
::BlockPos const& worldPos)
const
308 virtual ::std::variant<::gametest::GameTestError, ::Vec3> relativePosition(
::Vec3 const& worldPos)
const
312 virtual ::std::optional<::gametest::GameTestError>
313 assertCanReachLocation(
::Mob& mob,
::BlockPos const& pos,
bool expectedReach) ;
316 virtual ::std::optional<::gametest::GameTestError> spreadFromFaceTowardDirection(
318 ::ScriptModuleMinecraft::ScriptFacing fromFace,
319 ::ScriptModuleMinecraft::ScriptFacing direction
323 virtual ::std::optional<::gametest::GameTestError> getBlockSource(
::BlockSource*& blockSourceResult) ;
326 virtual ::std::variant<::gametest::GameTestError, ::SimulatedPlayer*>
327 spawnSimulatedPlayer(::std::string
const& name,
::BlockPos const& pos, ::GameType gameMode) ;
333 virtual ::std::variant<::gametest::GameTestError, ::Dimension*> getDimension() ;
336 virtual ::std::optional<::gametest::GameTestError> onPlayerJump(
::Mob& mob,
int jumpAmount) ;
342 MCAPI ::std::optional<::gametest::GameTestError> _assertEntityInstancePresent(
344 ::AABB const& searchBounds,
349 MCAPI ::std::optional<::gametest::GameTestError> _assertEntityPresent(
351 ::AABB const& searchBounds,
356 MCAPI ::Block
const& _getBlock(
::BlockPos const& pos);
358 MCAPI ::Container
const* _getContainer(
::BlockPos const& pos);
360 MCAPI
int _getItemEntityCount(
::Item const& item,
::AABB const& searchBounds);
362 MCAPI ::std::optional<::gametest::GameTestError> _getStructureBlockMissingError()
const;
371 MCAPI
void $succeedWhenEntityPresent(
377 MCAPI
void $succeedWhenEntityData(
380 ::std::function<
bool(
::Actor&)> dataPredicate
383 MCAPI
void $succeedWhenEntityHasComponent(
385 ::std::string
const& componentName,
390 MCAPI
void $succeedWhenBlockPresent(
::Block const& block,
int x,
int y,
int z,
bool isPresent);
392 MCAPI
void $succeedWhenBlockPresent(
::Block const& block,
::BlockPos const& pos,
bool isPresent);
396 MCAPI
void $setNight();
398 MCAPI
void $setDayTime(
int time);
400 MCAPI ::std::optional<::gametest::GameTestError>
401 $setBlock(
int x,
int y,
int z,
::Block const& block,
int updateFlags);
403 MCAPI ::std::optional<::gametest::GameTestError>
406 MCAPI ::std::optional<::gametest::GameTestError> $destroyBlock(
::BlockPos const& pos,
bool dropResources);
408 MCAPI ::std::optional<::gametest::GameTestError> $pressButton(
int x,
int y,
int z);
410 MCAPI ::std::optional<::gametest::GameTestError> $pressButton(
::BlockPos const& buttonPos);
412 MCAPI ::std::optional<::gametest::GameTestError> $pullLever(
int x,
int y,
int z);
414 MCAPI ::std::optional<::gametest::GameTestError> $pullLever(
::BlockPos const& leverPos);
416 MCAPI ::std::optional<::gametest::GameTestError> $killAllEntities();
418 MCAPI ::std::variant<::gametest::GameTestError, ::Actor*>
421 MCAPI ::std::variant<::gametest::GameTestError, ::Actor*>
424 MCAPI ::std::variant<::gametest::GameTestError, ::Actor*>
427 MCAPI ::std::variant<::gametest::GameTestError, ::Actor*>
430 MCAPI ::std::variant<::gametest::GameTestError, ::Actor*>
433 MCAPI ::std::variant<::gametest::GameTestError, ::Actor*>
436 MCAPI ::std::optional<::gametest::GameTestError> $walkTo(
::Mob& mob,
::BlockPos const& pos,
float speedModifier);
438 MCAPI ::std::optional<::gametest::GameTestError> $walkTo(
::Mob& mob,
::Vec3 const& pos,
float speedModifier);
440 MCAPI ::std::optional<::gametest::GameTestError> $setTntFuse(
::Actor& actor,
int fuseLength);
442 MCAPI ::std::optional<::gametest::GameTestError>
445 MCAPI ::std::optional<::gametest::GameTestError>
448 MCAPI ::std::optional<::gametest::GameTestError>
451 MCAPI ::std::optional<::gametest::GameTestError> $assertEntityPresent(
454 float const distance,
458 MCAPI ::std::optional<::gametest::GameTestError>
459 $assertEntityInstancePresent(
::Actor const* actor,
::BlockPos const& pos,
bool expectedPresent);
461 MCAPI ::std::optional<::gametest::GameTestError>
462 $assertEntityInstancePresent(
::Actor const* actor,
bool expectedPresent)
const;
464 MCAPI ::std::optional<::gametest::GameTestError>
467 MCAPI ::std::optional<::gametest::GameTestError> $assertEntityState(
470 ::std::function<
bool(
::Actor&)> dataPredicate
473 MCAPI ::std::optional<::gametest::GameTestError>
474 $assertBlockPresent(
::BlockLegacy const& blockType,
int x,
int y,
int z,
bool isPresent);
476 MCAPI ::std::optional<::gametest::GameTestError>
479 MCAPI ::std::optional<::gametest::GameTestError>
480 $assertBlockState(
::BlockPos const& blockPos, ::std::function<
bool(
::Block const&)> predicate);
482 MCAPI ::std::optional<::gametest::GameTestError>
483 $assertItemEntityPresent(
::Item const& item,
int x,
int y,
int z,
float searchDistance,
bool isPresent);
485 MCAPI ::std::optional<::gametest::GameTestError>
486 $assertItemEntityPresent(
::Item const& item,
::BlockPos const& pos,
float searchDistance,
bool isPresent);
488 MCAPI ::std::optional<::gametest::GameTestError>
489 $assertItemEntityCountIs(
::Item const& itemType,
::BlockPos const& pos,
float searchDistance,
int expectedCount);
491 MCAPI ::std::optional<::gametest::GameTestError> $assertContainerEmpty(
::BlockPos const& pos);
493 MCAPI ::std::optional<::gametest::GameTestError>
496 MCAPI ::std::optional<::gametest::GameTestError> $assertEntityHasComponent(
498 ::std::string
const& componentName,
503 MCAPI ::std::optional<::gametest::GameTestError> $assertEntityHasArmor(
505 ::SharedTypes::Legacy::ArmorSlot armorSlot,
506 ::std::string
const& armorName,
512 MCAPI ::std::optional<::gametest::GameTestError> $print(::std::string
const& text);
514 MCAPI ::std::optional<::gametest::GameTestError> $assertRedstonePower(
::BlockPos const& pos,
int expectedPower);
516 MCAPI ::std::optional<::gametest::GameTestError>
517 $assertIsWaterlogged(
::BlockPos const& pos,
bool expectedWaterlogged);
519 MCAPI ::std::optional<::gametest::GameTestError> $pulseRedstone(
::BlockPos const& pos,
int duration);
521 MCAPI ::std::variant<::gametest::GameTestError, ::ScriptModuleGameTest::ScriptGameTestConnectivity>
522 $getFenceConnectivity(
::BlockPos const& relativePos);
524 MCAPI ::std::optional<::gametest::GameTestError> $setFluidContainer(
::BlockPos const& pos,
int _fluidType);
526 MCAPI ::std::optional<::gametest::GameTestError> $triggerInternalBlockEvent(
528 ::std::string
const& event,
529 ::std::vector<float>
const& parameters
532 MCAPI ::std::variant<::gametest::GameTestError, ::BlockPos> $worldPosition(
::BlockPos const& relativePos)
const;
534 MCAPI ::std::variant<::gametest::GameTestError, ::Vec3> $worldPosition(
::Vec3 const& relativePos)
const;
536 MCAPI ::std::variant<::gametest::GameTestError, ::BlockPos> $relativePosition(
::BlockPos const& worldPos)
const;
538 MCAPI ::std::variant<::gametest::GameTestError, ::Vec3> $relativePosition(
::Vec3 const& worldPos)
const;
540 MCAPI ::std::optional<::gametest::GameTestError>
541 $assertCanReachLocation(
::Mob& mob,
::BlockPos const& pos,
bool expectedReach);
543 MCAPI ::std::optional<::gametest::GameTestError> $spreadFromFaceTowardDirection(
545 ::ScriptModuleMinecraft::ScriptFacing fromFace,
546 ::ScriptModuleMinecraft::ScriptFacing direction
549 MCAPI ::std::optional<::gametest::GameTestError> $getBlockSource(
::BlockSource*& blockSourceResult);
551 MCAPI ::std::variant<::gametest::GameTestError, ::SimulatedPlayer*>
552 $spawnSimulatedPlayer(::std::string
const& name,
::BlockPos const& pos, ::GameType gameMode);
556 MCAPI ::std::variant<::gametest::GameTestError, ::Dimension*> $getDimension();
558 MCAPI ::std::optional<::gametest::GameTestError> $onPlayerJump(
::Mob& mob,
int jumpAmount);