public SpawnNamedEntity(Wrapped.Wrapped socket, Form1 mainform) { int EID = socket.readInt(); string Name = socket.readString(); int X = socket.readInt(); int Y = socket.readInt(); int Z = socket.readInt(); byte Yaw = socket.readByte(); byte Pitch = socket.readByte(); short heldItem = socket.readShort(); functions parser = new functions(); parser.readMetadata(socket); Classes.Entity newPlayer = new Classes.Entity(EID, Name, X, Y, Z, Yaw, Pitch, heldItem); mainform.Entitys.Add(newPlayer); }
public SpawnMob(Wrapped.Wrapped socket, Form1 Mainform) { int EID = socket.readInt(); byte type = socket.readByte(); int X = socket.readInt(); int Y = socket.readInt(); int Z = socket.readInt(); byte Pitch = socket.readByte(); byte headPitch = socket.readByte(); byte Yaw = socket.readByte(); socket.readShort(); socket.readShort(); socket.readShort(); functions parser = new functions(); parser.readMetadata(socket); Classes.Entity newMob = new Classes.Entity(EID, ((functions.entityId)type).ToString(), X, Y, Z, Yaw, Pitch, 0); Mainform.Entitys.Add(newMob); }