-
Notifications
You must be signed in to change notification settings - Fork 8
Messaging protocol
gfv edited this page Mar 16, 2012
·
6 revisions
- mc_erl_chunk_manager
- mc_erl_entity_tracker
- mc_erl_tcp_listener
- mc_erl_event_passer
- mc_erl_player_sup
-
chunk_location->{X, Z} -
block_location->{X, Y, Z} -
entity_position->{X, Y, Z, Yaw, Pitch} -
chunk_column_data->{chunk_column_data, Full_column, Types=[{SubchunkID, Binary}, {SubchunkID, Binary}, ...], Metadata=[{SubchunkID, Binary}, {SubchunkID, Binary}, ...], Block_light=[{SubchunkID, Binary}, {SubchunkID, Binary}, ...], Sky_light[{SubchunkID, Binary}, {SubchunkID, Binary}, ...], Add_data=[], Biome=Binary} -
block_data->{Type, Metadata, Block_light, Sky_light, Biome}
- Call
{register_entity, Type, Supervisor}- Type isplayer,mobordrop. Registers entity with entity_location_update message destination Supervisor and returns Eid. Supervisor may benone. - Call '{register_entity, Type, Supervisor, Entity_position}` - same as above, but also initializes it with starting position.
- Cast
{update_entity, Eid, Entity_position}- Updates entity position and broadcasts this to each Supervisor of entities nearby. - Message format for entity_tracker's casts to supervisors: {entity_location_update, Eid, NewLocation}