Skip to content

Instantly share code, notes, and snippets.

@DylanLukes
Created November 6, 2010 23:42
Show Gist options
  • Save DylanLukes/665813 to your computer and use it in GitHub Desktop.
Save DylanLukes/665813 to your computer and use it in GitHub Desktop.
@protocol MHPacketDecoderDelegate <NSObject>
@required
- (void)packetDecoder:(id)sender didNotDecodePacket:(NSData *)packet;
@optional
- (void)packetDecoder:(id)sender didDecodeKeepAlive:(BOOL)unused;
- (void)packetDecoder:(id)sender didDecodeLoginRequest:(int32_t)protocolVersion username:(NSString *)username password:(NSString *)password mapseed:(int64_t)mapseed dimension:(int8_t)dimension;
- (void)packetDecoder:(id)sender didDecodeHandshake:(NSString*)username;
- (void)packetDecoder:(id)sender didDecodeChatMessage:(NSString*)message;
- (void)packetDecoder:(id)sender didDecodeTimeUpdate:(int64_t)time;
- (void)packetDecoder:(id)sender didDecodePlayerInventory:(int32_t)type count:(int16_t)count payload:(NSArray*)payload;
- (void)packetDecoder:(id)sender didDecodeSpawnPosition:(int32_t)x y:(int32_t)y z:(int32_t)z;
- (void)packetDecoder:(id)sender didDecodeClientState:(BOOL)onGround;
- (void)packetDecoder:(id)sender didDecodePlayerMove:(double)x y:(double)y stance:(double)stance z:(double)z onGround:(BOOL)onGround;
- (void)packetDecoder:(id)sender didDecodePlayerLook:(float)yaw pitch:(float)pitch onGround:(BOOL)onGround;
- (void)packetDecoder:(id)sender didDecodePlayerMoveAndLook:(double)x y:(double)y stance:(double)stance z:(double)z yaw:(float)yaw pitch:(float)pitch onGround:(BOOL)onGround;
- (void)packetDecoder:(id)sender didDecodePlayerDigging:(int8_t)status x:(int32_t)x y:(int8_t)y z:(int32_t) face:(int8_t)face;
- (void)packetDecoder:(id)sender didDecodePlayerBlockPlacement:(int16_t)itemid x:(int32_t)x y:(int8_t)y z:(int32_t) direction:(int8_t)direction;
- (void)packetDecoder:(id)sender didDecodeHeldItemChange:(int32_t)unused itemid:(int16_t)itemid;
- (void)packetDecoder:(id)sender didDecodeAddToInventory:(int16_t)itemid count:(int8_t)count life:(int16_t)life;
- (void)packetDecoder:(id)sender didDecodeArmAnimation:(int32_t)eid animate:(BOOL)animate;
- (void)packetDecoder:(id)sender didDecodeNamedEntitySpawn:(int32_t)eid name:(NSString*)name x:(int32_t)x y:(int32_t)y z:(int32_t)z rotation:(int8_t)rotation pitch:(int8_t)pitch currentItem:(int16_t)currentItem;
- (void)packetDecoder:(id)sender didDecodePickupEntitySpawn:(int32_t)eid item:(int16_t)itemid count:(int8_t)count x:(int32_t)x y:(int32_t)y z:(int32_t)z rotation:(int8_t)rotation pitch:(int8_t)pitch roll:(int8_t)roll;
- (void)packetDecoder:(id)sender didDecodeCollectItem:(int32_t)collected_eid collector:(int32_t)collector_eid;
- (void)packetDecoder:(id)sender didDecodeAddObject:(int32_t)eid type:(int8_t)type x:(int32_t)x y:(int32_t)y z:(int32_t)z;
- (void)packetDecoder:(id)sender didDecodeMobSpawn:(int32_t)eid type:(int8_t)type x:(int32_t)x y:(int32_t)y z:(int32_t)z yaw:(int8_t)yaw pitch:(int8_t)pitch;
- (void)packetDecoder:(id)sender didDecodeDestroyEntity:(int32_t)eid;
- (void)packetDecoder:(id)sender didDecodeEntity:(int32_t)eid;
- (void)packetDecoder:(id)sender didDecodeEntityRelativeMove:(int32_t)eid x:(int8_t)x y:(int8_t)y z:(int8_t)z;
- (void)packetDecoder:(id)sender didDecodeEntityLook:(int32_t)eid yaw:(int8_t)yaw pitch:(int8_t)pitch;
- (void)packetDecoder:(id)sender didDecodeEntityLookAndRelativeMove:(int32_t)eid x:(int8_t)x y:(int8_t)y z:(int8_t)z yaw:(int8_t)yaw pitch:(int8_t)pitch;
- (void)packetDecoder:(id)sender didDecodeEntityTeleport:(int32_t)eid x:(int32_t)x y:(int32_t)y z:(int32_t)z yaw:(int8_t)yaw pitch:(int8_t)pitch;
- (void)packetDecoder:(id)sender didDecodePreChunk:(int32_t)x z:(int32_t)z mode:(BOOL)mode;
- (void)packetDecoder:(id)sender didDecodeMapChunk:(int32_t)x y:(int16_t)y z:(int32_t)z sizeX:(int8_t)sizeX sizeY:(int8_t)sizeY sizeZ:(int8_t)sizeZ compressedSize:(int32_t)compressedSize compressedData:(NSData *)compressedData;
- (void)packetDecoder:(id)sender didDecodeMultiBlockChange:(int32_t)chunkX chunkZ:(int32_t)chunkZ arraySize:(int16_t)arraySize coordArray:(int16_t *)coordArray typeArray:(int8_t *)typeArray metaArray:(int8_t *)metaArray;
- (void)packetDecoder:(id)sender didDecodeBlockChange:(int32_t)x y:(int8_t)y z:(int32_t)z blockType:(int8_t)type metadata:(int8_t)metadata;
- (void)packetDecoder:(id)sender didDecodeKick:(NSString *)reason;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment