oops run the events
This commit is contained in:
parent
4da1a9f834
commit
c0f698ac7d
1 changed files with 2 additions and 2 deletions
|
@ -79,7 +79,7 @@ class GameState(Scaffold):
|
||||||
self.difficulty.name,
|
self.difficulty.name,
|
||||||
self.gamemode.name
|
self.gamemode.name
|
||||||
)
|
)
|
||||||
self.run_callbacks(JoinGameEvent(self.dimension, self.difficulty, self.gamemode))
|
self.run_callbacks(JoinGameEvent, JoinGameEvent(self.dimension, self.difficulty, self.gamemode))
|
||||||
await self.dispatcher.write(
|
await self.dispatcher.write(
|
||||||
PacketSettings(
|
PacketSettings(
|
||||||
self.dispatcher.proto,
|
self.dispatcher.proto,
|
||||||
|
@ -99,7 +99,7 @@ class GameState(Scaffold):
|
||||||
self.hp = packet.health
|
self.hp = packet.health
|
||||||
self.food = packet.food + packet.foodSaturation
|
self.food = packet.food + packet.foodSaturation
|
||||||
if died:
|
if died:
|
||||||
self.run_callbacks(DeathEvent.SENTINEL)
|
self.run_callbacks(DeathEvent, DeathEvent())
|
||||||
self.logger.info("Dead, respawning...")
|
self.logger.info("Dead, respawning...")
|
||||||
await asyncio.sleep(0.5)
|
await asyncio.sleep(0.5)
|
||||||
await self.dispatcher.write(
|
await self.dispatcher.write(
|
||||||
|
|
Loading…
Reference in a new issue