40 MinecraftGameTestHelper& operator=(MinecraftGameTestHelper
const&);
41 MinecraftGameTestHelper(MinecraftGameTestHelper
const&);
42 MinecraftGameTestHelper();
47 virtual ~MinecraftGameTestHelper() =
default;
49 virtual void succeedWhenEntityPresent(
57 virtual void succeedWhenEntityPresent(
63 virtual void succeedWhenEntityData(
66 ::std::function<
bool(
::Actor&)> dataPredicate
69 virtual void succeedWhenEntityHasComponent(
71 ::std::string
const& componentName,
76 virtual void succeedWhenBlockPresent(
::Block const& block,
int x,
int y,
int z,
bool isPresent) ;
78 virtual void succeedWhenBlockPresent(
::Block const& block,
::BlockPos const& pos,
bool isPresent) ;
83 virtual void setNight() ;
85 virtual void setDayTime(
int time) ;
87 virtual ::std::optional<::gametest::GameTestError>
88 setBlock(
int x,
int y,
int z,
::Block const& block,
int updateFlags) ;
90 virtual ::std::optional<::gametest::GameTestError>
93 virtual ::std::optional<::gametest::GameTestError>
94 destroyBlock(
::BlockPos const& pos,
bool dropResources) ;
96 virtual ::std::optional<::gametest::GameTestError> pressButton(
int x,
int y,
int z) ;
98 virtual ::std::optional<::gametest::GameTestError> pressButton(
::BlockPos const& buttonPos) ;
100 virtual ::std::optional<::gametest::GameTestError> pullLever(
int x,
int y,
int z) ;
102 virtual ::std::optional<::gametest::GameTestError> pullLever(
::BlockPos const& leverPos) ;
104 virtual ::std::optional<::gametest::GameTestError> killAllEntities() ;
106 virtual ::std::variant<::gametest::GameTestError, ::Actor*>
109 virtual ::std::variant<::gametest::GameTestError, ::Actor*>
112 virtual ::std::variant<::gametest::GameTestError, ::Actor*>
115 virtual ::std::variant<::gametest::GameTestError, ::Actor*>
118 virtual ::std::variant<::gametest::GameTestError, ::Actor*>
121 virtual ::std::variant<::gametest::GameTestError, ::Actor*>
124 virtual ::std::optional<::gametest::GameTestError>
127 virtual ::std::optional<::gametest::GameTestError>
128 walkTo(
::Mob& mob,
::Vec3 const& pos,
float speedModifier) ;
130 virtual ::std::optional<::gametest::GameTestError> setTntFuse(
::Actor& actor,
int fuseLength) ;
132 virtual ::std::optional<::gametest::GameTestError>
135 virtual ::std::optional<::gametest::GameTestError> assertEntityPresent(
143 virtual ::std::optional<::gametest::GameTestError> assertEntityPresent(
149 virtual ::std::optional<::gametest::GameTestError> assertEntityPresent(
152 float const distance,
156 virtual ::std::optional<::gametest::GameTestError>
157 assertEntityInstancePresent(
::Actor const* actor,
::BlockPos const& pos,
bool expectedPresent) ;
159 virtual ::std::optional<::gametest::GameTestError>
160 assertEntityInstancePresent(
::Actor const* actor,
bool expectedPresent)
const ;
162 virtual ::std::optional<::gametest::GameTestError> assertEntityTouching(
168 virtual ::std::optional<::gametest::GameTestError> assertEntityState(
171 ::std::function<
bool(
::Actor&)> dataPredicate
174 virtual ::std::optional<::gametest::GameTestError>
175 assertBlockPresent(
::BlockType const& blockType,
int x,
int y,
int z,
bool isPresent) ;
177 virtual ::std::optional<::gametest::GameTestError>
180 virtual ::std::optional<::gametest::GameTestError>
181 assertBlockState(
::BlockPos const& blockPos, ::std::function<
bool(
::Block const&)> predicate) ;
183 virtual ::std::optional<::gametest::GameTestError>
184 assertItemEntityPresent(
::Item const& item,
int x,
int y,
int z,
float searchDistance,
bool isPresent) ;
186 virtual ::std::optional<::gametest::GameTestError> assertItemEntityPresent(
189 float searchDistance,
193 virtual ::std::optional<::gametest::GameTestError> assertItemEntityCountIs(
196 float searchDistance,
200 virtual ::std::optional<::gametest::GameTestError> assertContainerEmpty(
::BlockPos const& pos) ;
202 virtual ::std::optional<::gametest::GameTestError>
205 virtual ::std::optional<::gametest::GameTestError> assertEntityHasComponent(
207 ::std::string
const& componentName,
212 virtual ::std::optional<::gametest::GameTestError> assertEntityHasArmor(
214 ::SharedTypes::Legacy::ArmorSlot armorSlot,
215 ::std::string
const& armorName,
221 virtual ::std::optional<::gametest::GameTestError> print(::std::string
const& text) ;
223 virtual ::std::optional<::gametest::GameTestError>
224 assertRedstonePower(
::BlockPos const& pos,
int expectedPower) ;
226 virtual ::std::optional<::gametest::GameTestError>
227 assertIsWaterlogged(
::BlockPos const& pos,
bool expectedWaterlogged) ;
229 virtual ::std::optional<::gametest::GameTestError> pulseRedstone(
::BlockPos const& pos,
int duration) ;
231 virtual ::std::variant<::gametest::GameTestError, ::ScriptModuleGameTest::ScriptGameTestConnectivity>
232 getFenceConnectivity(
::BlockPos const& relativePos) ;
234 virtual ::std::optional<::gametest::GameTestError>
235 setFluidContainer(
::BlockPos const& pos,
int _fluidType) ;
237 virtual ::std::optional<::gametest::GameTestError> triggerInternalBlockEvent(
239 ::std::string
const& event,
240 ::std::vector<float>
const& parameters
243 virtual ::std::variant<::gametest::GameTestError, ::BlockPos> worldPosition(
::BlockPos const& relativePos)
const
246 virtual ::std::variant<::gametest::GameTestError, ::Vec3> worldPosition(
::Vec3 const& relativePos)
const
249 virtual ::std::variant<::gametest::GameTestError, ::BlockPos> relativePosition(
::BlockPos const& worldPos)
const
252 virtual ::std::variant<::gametest::GameTestError, ::Vec3> relativePosition(
::Vec3 const& worldPos)
const
255 virtual ::std::optional<::gametest::GameTestError>
256 assertCanReachLocation(
::Mob& mob,
::BlockPos const& pos,
bool expectedReach) ;
258 virtual ::std::optional<::gametest::GameTestError> spreadFromFaceTowardDirection(
260 ::ScriptModuleMinecraft::ScriptFacing fromFace,
261 ::ScriptModuleMinecraft::ScriptFacing direction
264 virtual ::std::optional<::gametest::GameTestError> getBlockSource(
::BlockSource*& blockSourceResult) ;
266 virtual ::std::variant<::gametest::GameTestError, ::SimulatedPlayer*>
267 spawnSimulatedPlayer(::std::string
const& name,
::BlockPos const& pos, ::GameType gameMode) ;
271 virtual ::std::variant<::gametest::GameTestError, ::Dimension*> getDimension() ;
273 virtual ::std::optional<::gametest::GameTestError> onPlayerJump(
::Mob& mob,
int jumpAmount) ;
279 MCAPI ::std::optional<::gametest::GameTestError> _assertEntityInstancePresent(
281 ::AABB const& searchBounds,
286 MCAPI ::std::optional<::gametest::GameTestError> _assertEntityPresent(
288 ::AABB const& searchBounds,
293 MCAPI ::Block
const& _getBlock(
::BlockPos const& pos);
295 MCAPI ::Container
const* _getContainer(
::BlockPos const& pos);
297 MCAPI ::std::optional<::gametest::GameTestError> _getStructureBlockMissingError()
const;
306 MCAPI
void $succeedWhenEntityPresent(
312 MCAPI
void $succeedWhenEntityData(
315 ::std::function<
bool(
::Actor&)> dataPredicate
318 MCAPI
void $succeedWhenEntityHasComponent(
320 ::std::string
const& componentName,
325 MCAPI
void $succeedWhenBlockPresent(
::Block const& block,
int x,
int y,
int z,
bool isPresent);
327 MCAPI
void $succeedWhenBlockPresent(
::Block const& block,
::BlockPos const& pos,
bool isPresent);
329 MCAPI
void $succeedWhenBlockPresent(
::BlockType const& block,
::BlockPos const& position,
bool isPresent);
331 MCAPI
void $setNight();
333 MCAPI
void $setDayTime(
int time);
335 MCAPI ::std::optional<::gametest::GameTestError>
336 $setBlock(
int x,
int y,
int z,
::Block const& block,
int updateFlags);
338 MCAPI ::std::optional<::gametest::GameTestError>
341 MCAPI ::std::optional<::gametest::GameTestError> $destroyBlock(
::BlockPos const& pos,
bool dropResources);
343 MCAPI ::std::optional<::gametest::GameTestError> $pressButton(
int x,
int y,
int z);
345 MCAPI ::std::optional<::gametest::GameTestError> $pressButton(
::BlockPos const& buttonPos);
347 MCAPI ::std::optional<::gametest::GameTestError> $pullLever(
int x,
int y,
int z);
349 MCAPI ::std::optional<::gametest::GameTestError> $pullLever(
::BlockPos const& leverPos);
351 MCAPI ::std::optional<::gametest::GameTestError> $killAllEntities();
353 MCAPI ::std::variant<::gametest::GameTestError, ::Actor*>
356 MCAPI ::std::variant<::gametest::GameTestError, ::Actor*>
359 MCAPI ::std::variant<::gametest::GameTestError, ::Actor*>
362 MCAPI ::std::variant<::gametest::GameTestError, ::Actor*>
365 MCAPI ::std::variant<::gametest::GameTestError, ::Actor*>
368 MCAPI ::std::variant<::gametest::GameTestError, ::Actor*>
371 MCAPI ::std::optional<::gametest::GameTestError> $walkTo(
::Mob& mob,
::BlockPos const& pos,
float speedModifier);
373 MCAPI ::std::optional<::gametest::GameTestError> $walkTo(
::Mob& mob,
::Vec3 const& pos,
float speedModifier);
375 MCAPI ::std::optional<::gametest::GameTestError> $setTntFuse(
::Actor& actor,
int fuseLength);
377 MCAPI ::std::optional<::gametest::GameTestError>
380 MCAPI ::std::optional<::gametest::GameTestError>
383 MCAPI ::std::optional<::gametest::GameTestError>
386 MCAPI ::std::optional<::gametest::GameTestError> $assertEntityPresent(
389 float const distance,
393 MCAPI ::std::optional<::gametest::GameTestError>
394 $assertEntityInstancePresent(
::Actor const* actor,
::BlockPos const& pos,
bool expectedPresent);
396 MCAPI ::std::optional<::gametest::GameTestError>
397 $assertEntityInstancePresent(
::Actor const* actor,
bool expectedPresent)
const;
399 MCAPI ::std::optional<::gametest::GameTestError>
402 MCAPI ::std::optional<::gametest::GameTestError> $assertEntityState(
405 ::std::function<
bool(
::Actor&)> dataPredicate
408 MCAPI ::std::optional<::gametest::GameTestError>
409 $assertBlockPresent(
::BlockType const& blockType,
int x,
int y,
int z,
bool isPresent);
411 MCAPI ::std::optional<::gametest::GameTestError>
414 MCAPI ::std::optional<::gametest::GameTestError>
415 $assertBlockState(
::BlockPos const& blockPos, ::std::function<
bool(
::Block const&)> predicate);
417 MCAPI ::std::optional<::gametest::GameTestError>
418 $assertItemEntityPresent(
::Item const& item,
int x,
int y,
int z,
float searchDistance,
bool isPresent);
420 MCAPI ::std::optional<::gametest::GameTestError>
421 $assertItemEntityPresent(
::Item const& item,
::BlockPos const& pos,
float searchDistance,
bool isPresent);
423 MCAPI ::std::optional<::gametest::GameTestError>
424 $assertItemEntityCountIs(
::Item const& itemType,
::BlockPos const& pos,
float searchDistance,
int expectedCount);
426 MCAPI ::std::optional<::gametest::GameTestError> $assertContainerEmpty(
::BlockPos const& pos);
428 MCAPI ::std::optional<::gametest::GameTestError>
431 MCAPI ::std::optional<::gametest::GameTestError> $assertEntityHasComponent(
433 ::std::string
const& componentName,
438 MCAPI ::std::optional<::gametest::GameTestError> $assertEntityHasArmor(
440 ::SharedTypes::Legacy::ArmorSlot armorSlot,
441 ::std::string
const& armorName,
447 MCAPI ::std::optional<::gametest::GameTestError> $print(::std::string
const& text);
449 MCAPI ::std::optional<::gametest::GameTestError> $assertRedstonePower(
::BlockPos const& pos,
int expectedPower);
451 MCAPI ::std::optional<::gametest::GameTestError>
452 $assertIsWaterlogged(
::BlockPos const& pos,
bool expectedWaterlogged);
454 MCAPI ::std::optional<::gametest::GameTestError> $pulseRedstone(
::BlockPos const& pos,
int duration);
456 MCAPI ::std::variant<::gametest::GameTestError, ::ScriptModuleGameTest::ScriptGameTestConnectivity>
457 $getFenceConnectivity(
::BlockPos const& relativePos);
459 MCAPI ::std::optional<::gametest::GameTestError> $setFluidContainer(
::BlockPos const& pos,
int _fluidType);
461 MCAPI ::std::optional<::gametest::GameTestError> $triggerInternalBlockEvent(
463 ::std::string
const& event,
464 ::std::vector<float>
const& parameters
467 MCAPI ::std::variant<::gametest::GameTestError, ::BlockPos> $worldPosition(
::BlockPos const& relativePos)
const;
469 MCAPI ::std::variant<::gametest::GameTestError, ::Vec3> $worldPosition(
::Vec3 const& relativePos)
const;
471 MCAPI ::std::variant<::gametest::GameTestError, ::BlockPos> $relativePosition(
::BlockPos const& worldPos)
const;
473 MCAPI ::std::variant<::gametest::GameTestError, ::Vec3> $relativePosition(
::Vec3 const& worldPos)
const;
475 MCAPI ::std::optional<::gametest::GameTestError>
476 $assertCanReachLocation(
::Mob& mob,
::BlockPos const& pos,
bool expectedReach);
478 MCAPI ::std::optional<::gametest::GameTestError> $spreadFromFaceTowardDirection(
480 ::ScriptModuleMinecraft::ScriptFacing fromFace,
481 ::ScriptModuleMinecraft::ScriptFacing direction
484 MCAPI ::std::optional<::gametest::GameTestError> $getBlockSource(
::BlockSource*& blockSourceResult);
486 MCAPI ::std::variant<::gametest::GameTestError, ::SimulatedPlayer*>
487 $spawnSimulatedPlayer(::std::string
const& name,
::BlockPos const& pos, ::GameType gameMode);
491 MCAPI ::std::variant<::gametest::GameTestError, ::Dimension*> $getDimension();
493 MCAPI ::std::optional<::gametest::GameTestError> $onPlayerJump(
::Mob& mob,
int jumpAmount);