Repository navigation
Golem 0.2.0
Golem 0.2.0 makes golems behave much more like real players, and covers what most PocketMine servers are built from: minigame maps, menus, scoreboards, NPCs and virions.
yield $steve->walk(25, 0); // walls, gravity and fall damage included
$steve->chat('/shop');
yield $steve->waitForWindow();
$steve->clickSlot(0); // works with InvMenu
$this->assertScoreboardContains($steve, 'Online: 2');Upgrade with composer update achedon12/golem; the GitHub Action (achedon12/golem@v0) picks it up automatically.
Added
assertSoundPlayed(),assertPacketSent()andGolem::sounds()(#5).#[FreshWorld]and$this->freshWorld()to run a test in its own throwaway world (#8).--watchre-runs the tests whenever the plugin or its tests change (#24).- Inventory menus:
window(),waitForWindow(),clickSlot(),closeWindow(),assertWindowOpen()
andassertNoWindowOpen(). Works with InvMenu (#23). - Golems answer
NetworkStackLatencyPacketpings and acknowledge re-sent containers like a real
client, which InvMenu and some anti-cheats wait for. #[World('path')]and$this->loadWorld()to run a test in a copy of a world folder (#22).Golem::interactEntity(),Golem::respawn(),assertDead()andassertAlive()(#21).Golem::scoreboard(),Golem::bossBar(),assertScoreboardContains()andassertBossBar()(#20).#[DataProvider]to run a test once per data set (#19).assertKicked()andGolem::disconnectReason()(#18).- Golems move:
walkTo(),walk(),jump(),sneak()andsprint(), with collisions, step-up,
gravity and fall damage (#6). - Virions: the libraries listed in
.poggit.ymlare loaded (and downloaded from Poggit when
needed), plus any listed inextra.golem.virions(#7). - Documentation website at https://achedon12.github.io/golem/ and a wiki, both generated from
docs/.
Fixed
assertBlockAt()loads the chunk it checks, which used to read as air when no golem was nearby.- Virion downloads verify the TLS certificate (PocketMine's
Internethelper does not), only
follow HTTPS redirects, and are rejected unless they are virion phars. .poggit.ymlis only looked up in the plugin folder and its parents inside the same git
repository.- Golems now receive packets broadcast by the world (sounds, particles, entity animations), which
previously bypassed their inbox.
Full documentation: https://achedon12.github.io/golem/