-
Notifications
You must be signed in to change notification settings - Fork 0
/
Protocol.AsyncReceive.cs
51 lines (39 loc) · 1.35 KB
/
Protocol.AsyncReceive.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using MineLib.Core;
using MineLib.Core.Data;
using MineLib.Core.Data.Anvil;
namespace ProtocolClassic
{
public partial class Protocol
{
private void OnChatMessage(string message)
{
_minecraft.DoReceiveEvent(typeof(OnChatMessage), new OnChatMessage(message));
}
#region Anvil
private void OnChunkList(ChunkList chunks)
{
_minecraft.DoReceiveEvent(typeof(OnChunkList), new OnChunkList(chunks));
}
private void OnBlockChange(Position location, int block)
{
_minecraft.DoReceiveEvent(typeof(OnBlockChange), new OnBlockChange(location, block)); // TODO: Implement chunk coords2D
}
#endregion
private void OnPlayerPosition(Vector3 position)
{
_minecraft.DoReceiveEvent(typeof(OnPlayerPosition), new OnPlayerPosition(position));
}
private void OnPlayerLook(Vector3 look)
{
_minecraft.DoReceiveEvent(typeof(OnPlayerLook), new OnPlayerLook(look));
}
private void OnSpawnPoint(Position location)
{
_minecraft.DoReceiveEvent(typeof(OnSpawnPoint), new OnSpawnPoint(location));
}
private void OnRespawn(object gameInfo)
{
_minecraft.DoReceiveEvent(typeof(OnRespawn), new OnRespawn(gameInfo));
}
}
}