Created
December 21, 2010 01:02
-
-
Save TkTech/749317 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
# | |
# mobspawn.py | |
# pymc | |
# | |
# Created by Tyler Kennedy on 2010-12-20. | |
# Copyright 2010 Tyler Kennedy. All rights reserved. | |
# | |
from pymc.core.packets import Packets | |
from pymc.client.client import Client | |
@Client.add_handler(0x18, 'on_new_mob') | |
def MobSpawnHandler(sender): | |
with sender.reader.lock: | |
eid = sender.reader.read_int() | |
etype = sender.reader.read_byte() | |
pos = ( | |
sender.reader.read_int(), | |
sender.reader.read_int(), | |
sender.reader.read_int() | |
) | |
yaw = sender.reader.read_byte() | |
pitch = sender.reader.read_byte() | |
sender.on_new_mob.fire(sender, eid, etype, pos, yaw, pitch) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment